FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MultiPage

    struct · ferroui-controls · v0.5.0

    struct MultiPage
    

    Abstract base class for pages that host a collection of child pages.

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

    Returns a strong reference to this object.

    Source

    update_active_page_with

    fn update_active_page_with(self: &Self, navigation_type: NavigationType)
    

    Called when the active child page changes.

    The base class calls this method in the following situations, passing the corresponding navigation type:

    • NavigationType::Replace: the Pages collection was assigned, a new item was added, or the active page changed for any reason not covered below.
    • NavigationType::Remove: the currently active page was removed from the Pages collection or the collection was reset and the active page is no longer present. Subclasses should select a replacement page.

    Subclasses may also call this method directly with any navigation type appropriate for their own navigation model.

    Source

    pages_property

    fn pages_property() -> &'static StyledProperty<Option<PageList>>
    

    Defines the Pages property.

    Source

    items_source_property

    fn items_source_property() -> &'static StyledProperty<Option<ItemsSource>>
    

    Defines the ItemsSource property.

    Source

    page_template_property

    fn page_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
    

    Defines the PageTemplate property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    pages

    fn pages(self: &Self) -> Option<PageList>
    

    Gets or sets the collection of child pages.

    This control subscribes to the changes of the assigned collection. The subscription is released when a new collection is assigned or when the control is detached from the visual tree.

    Source

    set_pages

    fn set_pages(self: &Self, value: Option<PageList>)
    

    Source

    items_source

    fn items_source(self: &Self) -> Option<ItemsSource>
    

    Gets or sets a view-model collection to bind to. Use together with the page template to convert each item into a page. When set, takes precedence over the Pages property as the item source for the inner tab or carousel control.

    Source

    set_items_source

    fn set_items_source(self: &Self, value: Option<ItemsSource>)
    

    Source

    page_template

    fn page_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
    

    Gets or sets the data template used to create pages from view-model items.

    Source

    set_page_template

    fn set_page_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
    

    Source

    current_page_changed

    fn current_page_changed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
    

    Occurs when the CurrentPage property changes.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    pages_changed

    fn pages_changed(self: &Self, handler: impl Fn(&NotifyCollectionChangedEventArgs<'a, Ref<Page>>) -> () + 'static) -> Subscription
    

    Occurs when the Pages collection changes.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    items_source_of

    fn items_source_of(pages: &PageList) -> ItemsSource
    

    The untyped items list of a collection of pages, for the items source of an items control: each page is an item boxed as a control. The same handle is returned for the same collection for as long as a handle is alive, so that assigning it twice is not a change.

    Source

    pages_items_source

    fn pages_items_source(self: &Self) -> Option<ItemsSource>
    

    The value of the Pages property as the items source of an items control. See items_source_of.

    Source

    Trait implementations

    Availability

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