FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RelativeSourceExtension

    struct · ferroui-markup-xaml · v0.5.0

    struct RelativeSourceExtension
    

    {RelativeSource Mode}: describes the source of a binding relative to its target.

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    Source

    with_mode

    fn with_mode(mode: RelativeSourceMode) -> Rc<Self>
    

    Creates the extension with a mode.

    Source

    provide_value

    fn provide_value(self: &Self, service_provider: &Rc<dyn IServiceProvider>) -> Rc<RelativeSource>
    

    Creates the relative source the extension describes.

    Panics

    Panics if the ancestor level is less than 1. Use try_provide_value to handle it.

    Source

    try_provide_value

    fn try_provide_value(self: &Self, _service_provider: &Rc<dyn IServiceProvider>) -> Result<Rc<RelativeSource>, crate::XamlLoadError>
    

    provide_value without the panic: an ancestor level less than 1 is an error.

    Source

    mode

    fn mode(self: &Self) -> RelativeSourceMode
    

    Source

    set_mode

    fn set_mode(self: &Self, value: RelativeSourceMode)
    

    Source

    ancestor_type

    fn ancestor_type(self: &Self) -> Option<&'static TypeInfo>
    

    Source

    set_ancestor_type

    fn set_ancestor_type(self: &Self, value: Option<&'static TypeInfo>)
    

    Source

    tree

    fn tree(self: &Self) -> TreeType
    

    Source

    set_tree

    fn set_tree(self: &Self, value: TreeType)
    

    Source

    ancestor_level

    fn ancestor_level(self: &Self) -> i32
    

    Source

    set_ancestor_level

    fn set_ancestor_level(self: &Self, value: i32)
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • PartialEq
    • MarkupTyped

    Availability

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