TreeDataTemplate
struct · ferroui-markup-xaml · v0.5.0
struct TreeDataTemplate
A data template for hierarchical data, as markup declares it: besides the control of an item it describes where the children of the item come from.
Members
newdata_typeset_data_typecontentset_contentitems_sourceset_items_sourcematch_bind_childrenbuildfrom_data_templateas_data_template
new
fn new() -> Rc<Self>
data_type
fn data_type(self: &Self) -> Option<ValueType>
The type of data the template is for. None matches all data.
set_data_type
fn set_data_type(self: &Self, value: Option<ValueType>)
content
fn content(self: &Self) -> Option<BoxedValue>
The template content: deferred content built for each item.
set_content
fn set_content(self: &Self, value: Option<BoxedValue>)
items_source
fn items_source(self: &Self) -> Option<Rc<dyn BindingBase>>
The binding that selects the children of an item. It is assigned,
not applied: bind_children instantiates it
on the control that shows the children.
set_items_source
fn set_items_source(self: &Self, value: Option<Rc<dyn BindingBase>>)
match_
fn match_(self: &Self, data: Option<&BoxedValue>) -> bool
Whether the template is for data.
bind_children
fn bind_children(self: &Self, target: &FerroObject, target_property: &'static FerroProperty, _item: &BoxedValue) -> Rc<dyn IDisposable>
Binds the children of item to target_property of target.
build
fn build(self: &Self, data: Option<&BoxedValue>) -> Option<Ref<Control>>
Builds the control for data and gives it the data as its data
context.
from_data_template
fn from_data_template(template: &Rc<dyn IDataTemplate>) -> Option<Rc<TreeDataTemplate>>
The template behind a data template handle, if it is one of this class (the cast of the contract back to the class).
as_data_template
fn as_data_template(self: &Self) -> Rc<dyn IDataTemplate>
The template as the data template contract.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherITemplateWithParam<Option<Rc<dyn AnyValue>>, Option<Ref<Control>>>IDataTemplateITreeDataTemplateITypedDataTemplatePartialEqMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.