Class MainToolbarItemBase

Base class for all built-in main toolbar items.

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

To create a custom main toolbar item, create a class that inherits IMainToolbarItem interface.

Properties

| Edit this page View Source

MediaQueries

Gets or sets media queries for the toolbar item. 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 parentheses — for example, min-width: 480px won't work, whereas (min-width: 480px) will.

Declaration
[JsonProperty("mediaQueries", NullValueHandling = NullValueHandling.Ignore)]
public ObservableCollection<string> MediaQueries { get; }
Property Value
Type Description
ObservableCollection<string>
| Edit this page View Source

StyleClass

Gets or sets the custom style class name use for the toolbar item.

Declaration
[JsonProperty("class", NullValueHandling = NullValueHandling.Ignore)]
public string StyleClass { 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
object.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
object.GetHashCode()
| Edit this page View Source

ShouldSerializeMediaQueries()

Declaration
public bool ShouldSerializeMediaQueries()
Returns
Type Description
bool
| Edit this page View Source

ToJson()

Declaration
public string ToJson()
Returns
Type Description
string

Implements

IMainToolbarItem
INotifyPropertyChanged