Class ButtonItem
Class representing a button in the plugin UI.
Namespace: Emby.Web.GenericEdit.Elements
Assembly: Emby.Web.GenericEdit.dll
Syntax
public class ButtonItem
Constructors
ButtonItem()
Initializes a new instance of the ButtonItem class.
Declaration
public ButtonItem()
ButtonItem(List<ButtonItem>)
Initializes a new instance of the ButtonItem class.
Declaration
public ButtonItem(List<ButtonItem> subMenuButtons)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<ButtonItem> | subMenuButtons | The sub menu buttons. |
ButtonItem(String)
Initializes a new instance of the ButtonItem class.
Declaration
public ButtonItem(string caption)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | The caption. |
Properties
CanHideInCompactView
Gets or sets a value indicating whether the button can be hidden in views with limited screen space.
Declaration
public bool CanHideInCompactView { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This is intentended for hiding elements in views (like TV mnode), where screen space is limited.
Apply this to non-essential elements only as there might be no way to make them visible at the client side.
CanShowAsPageButton
Gets or sets a value indicating whether the button can be moved to a common block of buttons on the page.
Declaration
public bool CanShowAsPageButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Caption
Gets or sets the caption text.
Declaration
public string Caption { get; set; }
Property Value
Type | Description |
---|---|
System.String | The caption text. |
CommandId
Gets or sets the command identifier.
Declaration
public string CommandId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The command identifier. |
Remarks
This will eventually replace the Data1 property.
ConfirmationPrompt
Gets or sets the confirmation prompt.
Declaration
public string ConfirmationPrompt { get; set; }
Property Value
Type | Description |
---|---|
System.String | The confirmation prompt. |
Remarks
When a text is specified for this property, a message box will be shown on button click. The command will only be executed when the user confirms the message box with ok.
CreateInBottomPanel
Gets or sets a value indicating whether to place the button in bottom panel.
Declaration
public bool CreateInBottomPanel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This is effective in dialogs and wizards which have a panel with buttons at the bottom.
Data1
Gets or sets the data1 value, which is used as the CommandId in button events.
Declaration
public string Data1 { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data1 value. |
Data2
Gets or sets the data2 value which is available as item data in button events.
Declaration
public string Data2 { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data2. |
Icon
Gets or sets an icon for the button.
Declaration
public IconNames? Icon { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<IconNames> | The icon. |
IsEnabled
Gets or sets a value indicating whether this button is enabled.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsVisible
Gets or sets a value indicating whether this button is visible.
Declaration
public bool IsVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ItemData
Gets or sets the item data.
Declaration
public string ItemData { get; set; }
Property Value
Type | Description |
---|---|
System.String | The item data. |
Remarks
This will eventually replace the Data2 property.
StandardIcon
Gets or sets a standard icon.
Declaration
public StandardIcons? StandardIcon { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<StandardIcons> | The standard icon. |
Remarks
If specified, takes precedence over the Icon property.
SubMenuButtons
Gets or sets the sub menu buttons.
Declaration
public List<ButtonItem> SubMenuButtons { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ButtonItem> | The sub menu buttons. |
Remarks
If set, the button will open a popup menu where each ButtonItem is represened as a menu item.