Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.15 KB

README.md

File metadata and controls

44 lines (35 loc) · 1.15 KB

WPFMVVMUtility

WPF MVVM Utility Properties

Please view the provided WPF Test App for an example implementation. The basic idea is to have an easy way to use MVVM in small WPF apps/tools. It omits the usual

       public string SomeName
        {
            get
            {
                return _somename
            }
            set
            {
                if (value == _somename) return;
                _somename = SomeName;
                RaiseChangedEvent(SomeName);
            }
        }

and also provides some utility functions for value converters for bindings. The ValidatingNotifyingProperty provides easy to use validating properties that support multiple error messages.

Example Property:

     public NotifyingProperty<string> TextNotifyingProperty { get; } = new NotifyingProperty<string>(); 

Binding in xaml:

<TextBox Text="{Binding TextNotifyingProperty.Value}" />

Done :)

Feel free to submit suggestions, issues or pullrequest.

Distant Future:

* Autocomplete Textbox with optional automatic injection of recently used terms.
* Full UnitTest coverage.