kmitch62
asked on
How do i get a viewmodel object to remove itself from its containing observable Collecttion?
I am building an application that has a ObservableCollection containing a bunch of UserControls. The usercontrols are added because of a DataTemplate. The object actually added to the collection is an MVVM view Model obejct.
My usercontrol has a button on it that when pressed should cause itself to be removed from the list. Now i can Implement this as an event by calling a custom event in the in the usercontrol code behind and catching it in another list object derived from the ObservableCollection. but i would like to know if i can get the same behavior through the use of a command attachted to that button.
My usercontrol has a button on it that when pressed should cause itself to be removed from the list. Now i can Implement this as an event by calling a custom event in the in the usercontrol code behind and catching it in another list object derived from the ObservableCollection. but i would like to know if i can get the same behavior through the use of a command attachted to that button.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.