FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CommandBar

    struct · ferroui-controls · v0.5.0

    struct CommandBar
    

    A command bar that provides primary commands displayed inline and secondary commands accessible via an overflow menu.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<CommandBar>
    

    Returns a strong reference to this object.

    Source

    primary_commands_property

    fn primary_commands_property() -> &'static StyledProperty<Option<CommandBarElementList>>
    

    Defines the PrimaryCommands property.

    Source

    secondary_commands_property

    fn secondary_commands_property() -> &'static StyledProperty<Option<CommandBarElementList>>
    

    Defines the SecondaryCommands property.

    Source

    content_property

    fn content_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Defines the Content property.

    Source

    default_label_position_property

    fn default_label_position_property() -> &'static StyledProperty<CommandBarDefaultLabelPosition>
    

    Defines the DefaultLabelPosition property.

    Source

    is_dynamic_overflow_enabled_property

    fn is_dynamic_overflow_enabled_property() -> &'static StyledProperty<bool>
    

    Defines the IsDynamicOverflowEnabled property.

    Source

    overflow_button_visibility_property

    fn overflow_button_visibility_property() -> &'static StyledProperty<CommandBarOverflowButtonVisibility>
    

    Defines the OverflowButtonVisibility property.

    Source

    is_open_property

    fn is_open_property() -> &'static StyledProperty<bool>
    

    Defines the IsOpen property.

    Source

    is_sticky_property

    fn is_sticky_property() -> &'static StyledProperty<bool>
    

    Defines the IsSticky property.

    Source

    item_width_bottom_property

    fn item_width_bottom_property() -> &'static StyledProperty<f64>
    

    Defines the ItemWidthBottom property.

    Source

    item_width_right_property

    fn item_width_right_property() -> &'static StyledProperty<f64>
    

    Defines the ItemWidthRight property.

    Source

    item_width_collapsed_property

    fn item_width_collapsed_property() -> &'static StyledProperty<f64>
    

    Defines the ItemWidthCollapsed property.

    Source

    has_secondary_commands_property

    fn has_secondary_commands_property() -> &'static DirectProperty<CommandBar, bool>
    

    Defines the HasSecondaryCommands property.

    Source

    is_overflow_button_visible_property

    fn is_overflow_button_visible_property() -> &'static DirectProperty<CommandBar, bool>
    

    Defines the IsOverflowButtonVisible property.

    Source

    opening_event

    fn opening_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the Opening routed event.

    Source

    opened_event

    fn opened_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the Opened routed event.

    Source

    closing_event

    fn closing_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the Closing routed event.

    Source

    closed_event

    fn closed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the Closed routed event.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a command bar.

    Source

    visible_primary_commands

    fn visible_primary_commands(self: &Self) -> CommandBarElementCollection
    

    Gets the read-only collection of primary commands currently visible in the bar (may be a subset when dynamic overflow is active).

    Source

    overflow_items

    fn overflow_items(self: &Self) -> CommandBarElementCollection
    

    Gets the read-only collection of items shown in the overflow popup (secondary commands plus any primary commands moved to overflow by dynamic overflow).

    Source

    primary_commands

    fn primary_commands(self: &Self) -> CommandBarElementList
    

    Gets the collection of primary commands displayed in the bar. A bar without a collection is given a new one.

    Source

    set_primary_commands

    fn set_primary_commands(self: &Self, value: Option<CommandBarElementList>)
    

    Sets the collection of primary commands displayed in the bar.

    Source

    secondary_commands

    fn secondary_commands(self: &Self) -> CommandBarElementList
    

    Gets the collection of secondary commands shown in the overflow menu. A bar without a collection is given a new one.

    Source

    set_secondary_commands

    fn set_secondary_commands(self: &Self, value: Option<CommandBarElementList>)
    

    Sets the collection of secondary commands shown in the overflow menu.

    Source

    content

    fn content(self: &Self) -> Option<BoxedValue>
    

    Gets the custom content displayed at the start (left) of the bar.

    Source

    set_content

    fn set_content(self: &Self, value: Option<BoxedValue>)
    

    Sets the custom content displayed at the start (left) of the bar.

    Source

    default_label_position

    fn default_label_position(self: &Self) -> CommandBarDefaultLabelPosition
    

    Gets how labels are positioned on command buttons.

    Source

    set_default_label_position

    fn set_default_label_position(self: &Self, value: CommandBarDefaultLabelPosition)
    

    Sets how labels are positioned on command buttons.

    Source

    is_dynamic_overflow_enabled

    fn is_dynamic_overflow_enabled(self: &Self) -> bool
    

    Gets whether primary commands are automatically moved to the overflow menu when there is not enough space to display them.

    Source

    set_is_dynamic_overflow_enabled

    fn set_is_dynamic_overflow_enabled(self: &Self, value: bool)
    

    Sets whether primary commands are automatically moved to the overflow menu when there is not enough space to display them.

    Source

    overflow_button_visibility

    fn overflow_button_visibility(self: &Self) -> CommandBarOverflowButtonVisibility
    

    Gets the visibility of the overflow button.

    Source

    set_overflow_button_visibility

    fn set_overflow_button_visibility(self: &Self, value: CommandBarOverflowButtonVisibility)
    

    Sets the visibility of the overflow button.

    Source

    is_open

    fn is_open(self: &Self) -> bool
    

    Gets whether the overflow menu is open.

    Source

    set_is_open

    fn set_is_open(self: &Self, value: bool)
    

    Sets whether the overflow menu is open.

    Source

    is_sticky

    fn is_sticky(self: &Self) -> bool
    

    Gets whether the overflow menu stays open after a command is invoked (disables light-dismiss behavior).

    Source

    set_is_sticky

    fn set_is_sticky(self: &Self, value: bool)
    

    Sets whether the overflow menu stays open after a command is invoked (disables light-dismiss behavior).

    Source

    item_width_bottom

    fn item_width_bottom(self: &Self) -> f64
    

    Gets the estimated item width used in dynamic-overflow calculations when the default label position is CommandBarDefaultLabelPosition::Bottom.

    Source

    set_item_width_bottom

    fn set_item_width_bottom(self: &Self, value: f64)
    

    Sets the estimated item width used when the labels are at the bottom.

    Source

    item_width_right

    fn item_width_right(self: &Self) -> f64
    

    Gets the estimated item width used in dynamic-overflow calculations when the default label position is CommandBarDefaultLabelPosition::Right.

    Source

    set_item_width_right

    fn set_item_width_right(self: &Self, value: f64)
    

    Sets the estimated item width used when the labels are on the right.

    Source

    item_width_collapsed

    fn item_width_collapsed(self: &Self) -> f64
    

    Gets the estimated item width used in dynamic-overflow calculations when the default label position is CommandBarDefaultLabelPosition::Collapsed.

    Source

    set_item_width_collapsed

    fn set_item_width_collapsed(self: &Self, value: f64)
    

    Sets the estimated item width used when the labels are collapsed.

    Source

    has_secondary_commands

    fn has_secondary_commands(self: &Self) -> bool
    

    Gets whether there are any commands (secondary or overflowed primary) in the overflow menu.

    Source

    is_overflow_button_visible

    fn is_overflow_button_visible(self: &Self) -> bool
    

    Gets whether the overflow button is currently visible.

    Source

    opening

    fn opening(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when the overflow menu is about to open.

    Source

    opened

    fn opened(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when the overflow menu has opened.

    Source

    closing

    fn closing(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when the overflow menu is about to close.

    Source

    closed

    fn closed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when the overflow menu has closed.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.