FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ShowBehaviorBase

    struct · ferroui-xaml-interactions-custom · v0.5.0

    struct ShowBehaviorBase
    

    Base class for behaviors that show a control in response to an event.

    The class is abstract: a deriving class implements AttachedToVisualTreeBehaviorImpl::on_attached_to_visual_tree_override to listen for its event, and calls show when it fires.

    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<ShowBehaviorBase>
    

    Returns a strong reference to this object.

    Source

    target_control_property

    fn target_control_property() -> &'static StyledProperty<Option<ElementRef<Control>>>
    

    Identifies the TargetControl property.

    Deviation (DEVIATIONS.md, Behaviors): the behavior does not own the control, so the value is an element reference.

    Source

    event_routing_strategy_property

    fn event_routing_strategy_property() -> &'static StyledProperty<RoutingStrategies>
    

    Identifies the EventRoutingStrategy property: the routing strategy used for the triggering event.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    target_control

    fn target_control(self: &Self) -> Option<Ref<Control>>
    

    Gets or sets the target control. Markup resolves a name given for it to the named element. This is a property of the object model.

    Source

    set_target_control

    fn set_target_control(self: &Self, value: impl Into<Nullable<Control>>)
    

    Source

    event_routing_strategy

    fn event_routing_strategy(self: &Self) -> RoutingStrategies
    

    Gets or sets the routing strategy used for the triggering event.

    Source

    set_event_routing_strategy

    fn set_event_routing_strategy(self: &Self, value: RoutingStrategies)
    

    Source

    show

    fn show(self: &Self) -> bool
    

    Shows the target_control when the behavior is triggered.

    Returns true if the control was shown; otherwise, false.

    Source

    Trait implementations

    Availability

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