Skip to content

XAML MVVM Binding Extensions to simplify Markup and integrate VIEW with VIEWMODEL and ViewModel Attributes  #236

Closed
@cesarchefinho

Description

@cesarchefinho

Describe the problem

XAML is too verbose and cant read from anotations attibutes like validatos, data type etc in ViewModel

also XAML does not have and Validation Error mecanism for individual control error messages binded to ViewModel

Describe the solution

Binding Extensions MVVM Proposal to WINUI3 and UWP

An Extension to XAML language that simplify markup and expand XAML capabilities
by automatcaly bind control to ViewModel,
display validation error messages individualy per control,
and read all possible ViewModel Annotations to control without any coding

things like this

                    <!-- (PasswordBox , but any control, like Textbox, combobox, radio buttons, etc) -->

                    <PasswordBox 
                                Header="read DisplayName from anotations on view model"
                                Description=""read Error on viewmodel validation events"
                                PlaceholderText="read DisplayDescription from anotations on view model"
                                TextboxMask="read DisplayFormat from anotations on view model"
                                InputScope="Read best input scope based on anotations and viewmodel property"
                                Text="{x:Bind ViewModel.PasswordProp}"
                                MaxLength=""read all validation attributes from anotations on view model"
                                etc...etc...etc
                        />

simple will be this in markup:

                    <PasswordBox 
                                be:MVVM.ViewModel="{x:Bind ViewModel}"
                                be:MVVM.PropertyName="PasswordProp" />

the be:MVM extensions make all binding to you based on anottations of view model
also the be.MVVM extension use ObservableValidator and ObservablePropertyes
also the be:MVVM resolve binding to indexed string array attribute of collumns errors (bug in winui3 workedarrounded by be:MVVM)
also suport display error messages in TextBlock other than description property for controls that dont have Description

example:

                      <TextBlock Foreground="DarkRed" x:Name="AcceptErrorControl" />

Suported controls

        PasswordBox 
        AutoSuggestBox 
        NumberBox 
        RatingControl 
        RadioButtons 
        Slider 
        TimePicker 
        ComboBox 
        ListBox
        CheckBox 
        RadioButton 
        DatePicker 
        CalendarDatePicker
    TextBox           

**IT IS WORKING AND IS FUNCTIONAL

Also works on UNO in All Platforms AND in WINUI3 and UWP**

Alternatives

Waste a lot of time

Additional info

It is already implemented, i want to contribute to Microsoft

Help us help you

Yes, I'd like to be assigned to work on this item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions