FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AdaptiveBehavior

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

    struct AdaptiveBehavior
    

    Observes the Visual::bounds of the associated control, or of the source_control, and sets or removes style classes when the conditions of its AdaptiveClassSetters are met.

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

    Returns a strong reference to this object.

    Source

    source_control_property

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

    Identifies the SourceControl property.

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

    Source

    target_control_property

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

    Identifies the TargetControl property (an element reference, as SourceControl).

    Source

    setters_property

    fn setters_property() -> &'static DirectProperty<AdaptiveBehavior, AdaptiveClassSetters>
    

    Identifies the Setters property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a behavior.

    Source

    source_control

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

    Gets or sets the source control whose Visual::bounds_property property is observed; if it is not set, the associated object is used. This is a property of the object model; markup resolves a name given for it to the named control.

    Source

    set_source_control

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

    Source

    target_control

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

    Gets or sets the target control that class name that should be added or removed when triggered, if not set the associated object is used or the target_control of the AdaptiveClassSetter. This is a property of the object model; markup resolves a name given for it to the named control.

    Source

    set_target_control

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

    Source

    setters

    fn setters(self: &Self) -> AdaptiveClassSetters
    

    Gets adaptive class setters collection. This is a property of the object model, and the content of the behavior in markup.

    Source

    Trait implementations

    Availability

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