Using Dictionary as Binding source for Xaml Collection

26 בAugust 2015

If you find the trigger just pull it off.. Unfortunately I have found more than once programmers who used to translate the dictionary struct into an IEnumerable to present one dimension collection at the UI, And its is not because ObseervableCollection problem since it is quite easy to have an ObservableDictionary if you have the Notification binding consideration. Assume you have an Dictionary of key value in your model, lets say of CustomerName, and a Customer, while you already have it, and all what yours App is about Customer Names in DropDown List, but in underline you do need the real Entity...
אין תגובות

Xaml – Validation – IdataErrorInfo with RegX

10 בAugust 2015

WPF provide the well-known Validation mechanism, its colored with red border the under-validation-control.        I have been recently asked few times how to use it, so here is the simple and shortest demo you might find. At the ViewModel: Implement IDataErrorInfo interface from ComponentModel , Its provide a indexer which get called only if you defined validation connection on Xaml. public class viewModelDemo : IDataErrorInfo { public string Error { get { throw new NotImplementedException(); } ...
אין תגובות