RelativeSourceExtension
struct · ferroui-markup-xaml · v0.5.0
struct RelativeSourceExtension
{RelativeSource Mode}: describes the source of a binding relative to
its target.
Members
newwith_modeprovide_valuetry_provide_valuemodeset_modeancestor_typeset_ancestor_typetreeset_treeancestor_levelset_ancestor_level
new
fn new() -> Rc<Self>
with_mode
fn with_mode(mode: RelativeSourceMode) -> Rc<Self>
Creates the extension with a mode.
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.
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.
mode
fn mode(self: &Self) -> RelativeSourceMode
set_mode
fn set_mode(self: &Self, value: RelativeSourceMode)
ancestor_type
fn ancestor_type(self: &Self) -> Option<&'static TypeInfo>
set_ancestor_type
fn set_ancestor_type(self: &Self, value: Option<&'static TypeInfo>)
tree
fn tree(self: &Self) -> TreeType
set_tree
fn set_tree(self: &Self, value: TreeType)
ancestor_level
fn ancestor_level(self: &Self) -> i32
set_ancestor_level
fn set_ancestor_level(self: &Self, value: i32)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherPartialEqMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.