FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MaterialTextField

    struct · ferroui-themes-material · v0.5.0

    struct MaterialTextField
    

    Attached Material text-field decoration. Works on the existing TextBox; choosing a theme does not replace the editor or its automation peer.

    <TextBox material:MaterialTextField.Label="Amount"
             material:MaterialTextField.Prefix="$"
             material:MaterialTextField.Suffix="USD"
             material:MaterialTextField.SupportingText="Before tax"
             PlaceholderText="0.00" />
    

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    label_property

    fn label_property() -> &'static AttachedProperty<Option<String>>
    

    A label independent of the editor's placeholder. Empty labels are omitted.

    Source

    prefix_property

    fn prefix_property() -> &'static AttachedProperty<Option<String>>
    

    Noneditable text before the editable value, with the native 2dp gap.

    Source

    suffix_property

    fn suffix_property() -> &'static AttachedProperty<Option<String>>
    

    Noneditable text after the editable value, with the native 2dp gap.

    Source

    leading_icon_property

    fn leading_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    Leading content, centered in a minimum 48dp slot. Icons normally measure 24dp. Use a real button as content when the icon performs an action.

    Source

    trailing_icon_property

    fn trailing_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    Trailing content, centered in a minimum 48dp slot. Interactive content retains its own keyboard and automation contracts.

    Source

    supporting_text_property

    fn supporting_text_property() -> &'static AttachedProperty<Option<String>>
    

    Assistance displayed 4dp below the painted field, outside its container.

    Source

    error_text_property

    fn error_text_property() -> &'static AttachedProperty<Option<String>>
    

    An application validation message. A nonempty message also activates the error appearance; clearing it restores the supporting text.

    Source

    is_error_property

    fn is_error_property() -> &'static AttachedProperty<bool>
    

    Activates error appearance without changing FerroUI's validation errors. Supply ErrorText for a specific, localized accessibility description.

    Source

    show_character_count_property

    fn show_character_count_property() -> &'static AttachedProperty<bool>
    

    Displays the live UTF-16 count, consistent with TextBox positions and MaxLength.

    Source

    character_limit_property

    fn character_limit_property() -> &'static AttachedProperty<i32>
    

    Advisory UTF-16 limit. Exceeding it marks the field and counter as errors, without truncating input or interfering with composition/undo. Zero uses TextBox.MaxLength, or shows an unbounded count when MaxLength is also zero.

    Source

    assistive_text_property

    fn assistive_text_property() -> &'static AttachedProperty<Option<String>>
    

    Computed message for the template. Applications should set SupportingText or ErrorText instead of writing this output property.

    Source

    counter_text_property

    fn counter_text_property() -> &'static AttachedProperty<Option<String>>
    

    Computed counter for the template; do not set directly.

    Source

    automation_description_property

    fn automation_description_property() -> &'static AttachedProperty<Option<String>>
    

    Computed assistance/error/counter description used as the theme's default AutomationProperties.HelpText. An explicit application value takes priority.

    Source

    get_label

    fn get_label(field: &TextBox) -> Option<String>
    

    Source

    set_label

    fn set_label(field: &TextBox, value: Option<&str>)
    

    Source

    get_prefix

    fn get_prefix(field: &TextBox) -> Option<String>
    

    Source

    set_prefix

    fn set_prefix(field: &TextBox, value: Option<&str>)
    

    Source

    get_suffix

    fn get_suffix(field: &TextBox) -> Option<String>
    

    Source

    set_suffix

    fn set_suffix(field: &TextBox, value: Option<&str>)
    

    Source

    get_leading_icon

    fn get_leading_icon(field: &TextBox) -> Option<BoxedValue>
    

    Source

    set_leading_icon

    fn set_leading_icon(field: &TextBox, value: Option<BoxedValue>)
    

    Source

    get_trailing_icon

    fn get_trailing_icon(field: &TextBox) -> Option<BoxedValue>
    

    Source

    set_trailing_icon

    fn set_trailing_icon(field: &TextBox, value: Option<BoxedValue>)
    

    Source

    get_supporting_text

    fn get_supporting_text(field: &TextBox) -> Option<String>
    

    Source

    set_supporting_text

    fn set_supporting_text(field: &TextBox, value: Option<&str>)
    

    Source

    get_error_text

    fn get_error_text(field: &TextBox) -> Option<String>
    

    Source

    set_error_text

    fn set_error_text(field: &TextBox, value: Option<&str>)
    

    Source

    get_is_error

    fn get_is_error(field: &TextBox) -> bool
    

    Source

    set_is_error

    fn set_is_error(field: &TextBox, value: bool)
    

    Source

    get_show_character_count

    fn get_show_character_count(field: &TextBox) -> bool
    

    Source

    set_show_character_count

    fn set_show_character_count(field: &TextBox, value: bool)
    

    Source

    get_character_limit

    fn get_character_limit(field: &TextBox) -> i32
    

    Source

    set_character_limit

    fn set_character_limit(field: &TextBox, value: i32)
    

    Source

    get_assistive_text

    fn get_assistive_text(field: &TextBox) -> Option<String>
    

    Source

    get_counter_text

    fn get_counter_text(field: &TextBox) -> Option<String>
    

    Source

    get_automation_description

    fn get_automation_description(field: &TextBox) -> Option<String>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • CastableFrom<ST, Uninit, Uninit>
    • CastableFrom<ST, Initialized, Initialized>
    • Read<Exclusive, BecauseExclusive>
    • StaticType

    Availability

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