FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IContentControl

    trait · ferroui-controls · v0.5.0

    trait IContentControl
    

    Defines a control that displays content according to a data template.

    A class implementing the trait is made known with register_content_control, normally from its class initialization; as_content_control then views an object of the class (or of a class derived from it) as the interface.

    View source

    Members

    content

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

    The content to display.

    Source

    set_content

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

    Sets the content to display.

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

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

    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)
    

    Sets the horizontal alignment of the content within the control.

    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)
    

    Sets the vertical alignment of the content within the control.

    Source

    Trait implementations

    Availability

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