FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DataValidationErrors

    struct · ferroui-controls · v0.5.0

    struct DataValidationErrors
    

    A control which displays an error notifier when there is a data validation error. Provides attached properties to track errors on a control.

    You will probably only want to create instances inside of control templates. Pseudo-classes (on the control with the errors): :error.

    An error is an untyped value: the error data of a data validation error, or the error itself boxed as a BindingError.

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

    Returns a strong reference to this object.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    errors_property

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

    Defines the DataValidationErrors.Errors attached property.

    Source

    has_errors_property

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

    Defines the DataValidationErrors.HasErrors attached property.

    Source

    error_converter_property

    fn error_converter_property() -> &'static AttachedProperty<Option<ErrorConverter>>
    

    Defines the DataValidationErrors.ErrorConverter attached property.

    Source

    error_template_property

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

    Defines the DataValidationErrors.ErrorTemplate property.

    Source

    owner_property

    fn owner_property() -> &'static DirectProperty<DataValidationErrors, Option<ElementRef<Control>>>
    

    Defines the Owner property.

    Deviation (DEVIATIONS.md, Data validation): the owner is the control the errors are shown in, an ancestor of this control, which this control does not own, so the value is an element reference where the managed property holds the control. The themes make it the DataContext of a part of the template (DataContext="{TemplateBinding Owner}"), which holds the reference as it is.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Initializes a new instance of the DataValidationErrors class.

    Source

    owner

    fn owner(self: &Self) -> Option<Ref<Control>>
    

    The control whose errors are displayed.

    Source

    set_owner

    fn set_owner(self: &Self, value: Option<Ref<Control>>)
    

    Source

    error_template

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

    The data template of the errors.

    Source

    set_error_template

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

    Source

    get_errors

    fn get_errors(control: &Control) -> Option<Vec<BoxedValue>>
    

    Gets the errors of a control.

    Source

    set_errors

    fn set_errors(control: &Control, errors: Option<Vec<BoxedValue>>)
    

    Sets the errors of a control.

    Source

    set_error

    fn set_error(control: &Control, error: Option<&BindingError>)
    

    Sets the errors of a control from the error of a binding.

    Source

    clear_errors

    fn clear_errors(control: &Control)
    

    Clears the errors of a control.

    Source

    get_has_errors

    fn get_has_errors(control: &Control) -> bool
    

    Whether a control has errors.

    Source

    get_error_converter

    fn get_error_converter(control: &Control) -> Option<ErrorConverter>
    

    Gets the error converter of a control.

    Source

    set_error_converter

    fn set_error_converter(control: &Control, converter: Option<ErrorConverter>)
    

    Sets the error converter of a control.

    Source

    Trait implementations

    Availability

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