FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ItemsPanelTemplate

    struct · ferroui-markup-xaml · v0.5.0

    struct ItemsPanelTemplate
    

    The template of the panel that hosts the items of an items control.

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    Source

    content

    fn content(self: &Self) -> Option<BoxedValue>
    

    The template content: deferred content built on each build.

    Source

    set_content

    fn set_content(self: &Self, value: Option<BoxedValue>)
    

    Source

    build

    fn build(self: &Self) -> Option<Ref<Panel>>
    

    Builds the panel.

    Inside an error scope of a load (with_xaml_errors), a failure is the error of the scope and the template builds nothing.

    Panics

    Outside an error scope, panics if the content builds a control that is not a panel.

    Source

    try_build

    fn try_build(self: &Self) -> Result<Option<Ref<Panel>>, crate::XamlLoadError>
    

    build without the panic: content that is not a panel is an error.

    Source

    as_template

    fn as_template(self: &Self) -> Rc<dyn ITemplateOf<Option<Ref<Panel>>>>
    

    The template as the typed template contract.

    Source

    Trait implementations

    Availability

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