FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CenterWindowBehavior

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

    struct CenterWindowBehavior
    

    Centers the attached window on the current screen when it is attached to the visual tree.

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

    Returns a strong reference to this object.

    Source

    window_property

    fn window_property() -> &'static StyledProperty<Option<ElementRef<Window>>>
    

    Identifies the Window property.

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

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a behavior.

    Source

    window

    fn window(self: &Self) -> Option<Ref<Window>>
    

    Gets or sets the window to center. If not set, the visual root window is used. Markup resolves a name given for it to the named window.

    Source

    set_window

    fn set_window(self: &Self, value: impl Into<Nullable<Window>>)
    

    Source

    Trait implementations

    Availability

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