Class Attributes

Represents the attributes of a IToolbarItem.

Inheritance
System.Object
Attributes
Namespace: PSPDFKit.UI.ToolbarComponents
Assembly: PSPDFKit.dll
Syntax
public sealed class Attributes

Properties

ClassName

Useful to set a custom CSS class name on the item.

Declaration
public string ClassName { get; set; }
Property Value
Type Description
System.String

DropdownGroup

Can be used to group multiple toolbar buttons in the same DropdownGroup. Only one of the buttons will be visible, with a dropdown arrow to hint the user about the dropdown group.
When the user clicks on the arrow, the rest of the buttons will be shown vertically piled. The toolbar buttons that belong to a dropdown group will preserve all the properties of individual toolbar buttons.

In order to decide which toolbar item is visible, the following criteria is used:

  • If a button is globally selected, it's rendered on top.
  • Otherwise, the last globally selected button of the list is rendered on top.
  • If none of those has been selected before, the first button on the dropdown group is rendered on top.
Declaration
public string DropdownGroup { get; set; }
Property Value
Type Description
System.String

Id

Unique identifier for the item. Required for OnItemPressEvent.

Declaration
public string Id { get; set; }
Property Value
Type Description
System.String

MediaQueries

An array of valid media queries which are used to determine the visibility of an item. Internally media queries are managed using the Window.matchMedia() API.
As per the W3C Spec in many cases media queries require parenthesis for example min-width: 480px won't work whereas (min-width: 480px) will.

Declaration
public IList<string> MediaQueries { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

ResponsiveGroup

Can be used to link multiple toolbar items to the same Toolbar type.
Those items will be hidden when the responsive group icon is displayed and can be seen when we click (i.e. open) the group.
Whenever a toolbar item is active and it's responsive group is shown, the responsive group is open so the active state can be seen.

Declaration
public string ResponsiveGroup { get; set; }
Property Value
Type Description
System.String

Title

Title for the toolbar item. It is shown on hover or when the item doesn't have an icon.

Declaration
public string Title { get; set; }
Property Value
Type Description
System.String