Class MainToolbarButtonBase

Base class for all built-in main toolbar button.

Namespace: PSPDFKit.Sdk.Models.Toolbar.Base
Assembly: Sdk.dll
Syntax
public abstract class MainToolbarButtonBase : MainToolbarItemBase, IMainToolbarButton, IMainToolbarItem, INotifyPropertyChanged
Remarks

To create a custom main toolbar button, create a class that inherits IMainToolbarButton interface.

Properties

| Edit this page View Source

DropdownGroup

Gets or sets the name of the dropdown menu to which the toolbar item belongs. This can be used to group multiple toolbar items in the same dropdown menu. Only one of the buttons will be visible, with a dropdown arrow as a hint to the user about the dropdown menu. When the user clicks on the arrow, the rest of the buttons will be shown vertically piled. 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 these have been selected before, the first button on the dropdown group is rendered on top.
Declaration
[JsonProperty("dropdownGroup", NullValueHandling = NullValueHandling.Ignore)]
public string DropdownGroup { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Icon

Gets or sets path of the icon for the toolbar item. Icon should be an svg image stored as raw asset in the app i.e. it should be present in Resources/Raw/Assets folder in project.

Declaration
[JsonProperty("icon", NullValueHandling = NullValueHandling.Ignore)]
public string Icon { get; set; }
Property Value
Type Description
string
| Edit this page View Source

IsDisabled

Gets or sets if the item is disabled.

Declaration
[JsonProperty("disabled", NullValueHandling = NullValueHandling.Ignore)]
public bool? IsDisabled { get; set; }
Property Value
Type Description
bool?
| Edit this page View Source

Tooltip

Gets or sets the tool tip for the item.

Declaration
[JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)]
public string Tooltip { get; set; }
Property Value
Type Description
string

Methods

| Edit this page View Source

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
object o
Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

Overrides
MainToolbarItemBase.Equals(object)
| Edit this page View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
MainToolbarItemBase.GetHashCode()

Implements

IMainToolbarButton
IMainToolbarItem
INotifyPropertyChanged