MVVM and Updating a Selected Count
Here is one way to do what you require, without having to connect alot of events from every single myObject. It goes a little outside the MVVM box, but despite people talking best practise and all, it...
View ArticleMVVM and Updating a Selected Count
public int Count { get { return _objects.Where(o => o.Selected == true).Count(); } }I would do like this for the count property.And then find a way to use the NotifyPropertyChanged whenever one of...
View ArticleMVVM and Updating a Selected Count
Hi, the pure MVVM solution is: let the ViewModel subscribe to each Object's PropertyChanged event. In the handler, increment/decrement the "Count" property according to a set/unset "Selected" value of...
View ArticleMVVM and Updating a Selected Count
I have a viewmodel that has a list of objects and on the object i have a selected property. My view has a datagrid and the itemssource of the datagrid is the list of objects in the viewmodel. The...
View Article