FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ContentControl

    struct · ferroui-controls · v0.5.0

    struct ContentControl
    

    Displays content according to an IDataTemplate.

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

    Returns a strong reference to this object.

    Source

    register_content_presenter

    fn register_content_presenter(self: &Self, presenter: &ContentPresenter) -> bool
    

    Called when a content presenter whose templated parent is this control is created. Returns true if the presenter was registered as a presenter of the control.

    Source

    TEMPLATE_PARTS

    const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
    

    The named parts expected in the control template.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    content_property

    fn content_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Defines the Content property.

    Source

    content_template_property

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

    Defines the ContentTemplate property.

    Source

    horizontal_content_alignment_property

    fn horizontal_content_alignment_property() -> &'static StyledProperty<HorizontalAlignment>
    

    Defines the HorizontalContentAlignment property.

    Source

    vertical_content_alignment_property

    fn vertical_content_alignment_property() -> &'static StyledProperty<VerticalAlignment>
    

    Defines the VerticalContentAlignment property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    content

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

    The content to display.

    Source

    set_content

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

    Source

    content_template

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

    The data template used to display the content of the control.

    Source

    set_content_template

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

    Source

    presenter

    fn presenter(self: &Self) -> Option<Ref<ContentPresenter>>
    

    The presenter from the control's template.

    Source

    horizontal_content_alignment

    fn horizontal_content_alignment(self: &Self) -> HorizontalAlignment
    

    The horizontal alignment of the content within the control.

    Source

    set_horizontal_content_alignment

    fn set_horizontal_content_alignment(self: &Self, value: HorizontalAlignment)
    

    Source

    vertical_content_alignment

    fn vertical_content_alignment(self: &Self) -> VerticalAlignment
    

    The vertical alignment of the content within the control.

    Source

    set_vertical_content_alignment

    fn set_vertical_content_alignment(self: &Self, value: VerticalAlignment)
    

    Source

    Trait implementations

    Availability

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