Nov 18, 2012 at 4:30 AM
Edited Nov 18, 2012 at 4:32 AM
|
SelectedItems consider a behavior... There are plenty of examples of this.
for selecteditem, bind to an property in the viewmodel of the type associated with the selected item, mode = twoway
--XAML --
<ListBox SelectedItem="{Binding SomeItemProp, Mode=TwoWay}" />
-- C# --
public int SomeItemProp {
get{ return _someItemProp;}
set{
_someItemProp = value;
NotifyOfPropertyChange(()=>SomeItemProp);
}
}
remove it from the collection that is bound to the ListBox and refresh or update
|