Skip to content

ToolbarItem class

Provides the base functionality for items displayed in toolbars, menus, and ribbons.

Namespace: Eremex.AvaloniaUI.Controls.Bars
Assembly: Eremex.Avalonia.Controls.dll
NuGet Package: Eremex.Avalonia.Controls

Declaration

public class ToolbarItem : TemplatedControl, IBorderStateProvider, ICommandSource, INavigationItem, 
    IToolbarActionItem

Public Members

name description
ToolbarItem() Initializes a new instance of the ToolbarItem class.
Alignment { get; set; } Gets or sets the alignment of the item within its toolbar.
Category { get; set; } Gets or sets the category used to organize the item during customization.
CloseMenuOnClick { get; set; } Gets or sets whether clicking the item closes its containing menu.
Command { get; set; } Gets or sets the command executed when the item is activated.
CommandParameter { get; set; } Gets or sets the parameter passed to the item's command.
CustomizationName { get; set; } Gets or sets the name displayed for the item during customization.
Description { get; set; } Gets or sets the additional descriptive text displayed for the item.
DisplayMode { get; set; } Gets or sets which parts of the item are displayed.
Glyph { get; set; } Gets or sets the image displayed for the item.
GlyphAlignment { get; set; } Gets or sets the position of the glyph relative to the item header.
GlyphSize { get; set; } Gets or sets the size used to display the item's glyph.
GlyphSizeMode { get; set; } Gets or sets how the size of the item's glyph is determined.
GlyphTemplate { get; set; } Gets or sets the template used to display the item's glyph.
Group { get; } Gets the toolbar item group that contains the item, or null if its holder is not a group.
Header { get; set; } Gets or sets the item's header content.
HeaderContentHorizontalAlignment { get; set; } Gets or sets the horizontal alignment of the item header's content.
HeaderTemplate { get; set; } Gets or sets the template used to display the item's header.
Hint { get; set; } Gets or sets the tooltip text displayed for the item.
Holder { get; } Gets the container that owns the item.
HotKey { get; set; } Gets or sets the keyboard shortcut that activates the item.
HotKeyDisplayString { get; set; } Gets or sets the text displayed for the item's keyboard shortcut.
Id { get; set; } Gets or sets the identifier of the toolbar item.
IsLocatedInRibbon { get; } Gets whether the item belongs to a ribbon.
IsSelected { get; set; } Gets or sets whether the item is selected.
KeyTip { get; set; } Gets or sets the key sequence displayed to activate this item during key tip navigation.
Manager { get; set; } Gets or sets the toolbar manager associated with this object.
Palette { get; set; } Gets or sets the palette used to render the item's glyph.
RecognizesAccessKey { get; set; } Gets or sets whether an underscore in the header identifies an access key.
RibbonCommandLayout { get; } Gets the ribbon command layout used to display the item.
ScreenBounds { get; } Gets the bounds of the item in screen coordinates.
SerializationInfo { get; } Gets the layout information used during serialization or deserialization.
SerializationName { get; set; } Gets or sets the name used to identify this object during layout serialization.
ShowSeparator { get; set; } Gets or sets whether a separator is displayed before the item.
Toolbar { get; } Gets the toolbar that contains the item.
event Click Occurs when the item is clicked.
event Press Occurs when the pointer button is pressed over the item.
GetRootHolder() Returns the outermost holder of the toolbar item.
virtual GetShortcutDisplayString() Returns the text used to display the item's keyboard shortcut.
OnDragLeave() Clears the item's drag-over state.
OnDropDownBorderEnter(…) Processes the pointer entering the item's drop-down area.
OnDropDownBorderLeave(…) Processes the pointer leaving the item's drop-down area.
OnDropDownBorderReleased(…) Processes a pointer release over the item's drop-down area.
override ToString()

See Also

Used in articles