Problem Statement:
I have two listboxes and i need to maintain single selection across the page within the listboxes.
Solution:
Keep SelectedItem as single and have like below
private Employee selectedItem;
public Employee SelectedItem{
get
{
return selectedItem;
}
set
{
//For clearing existing selection
selectedItem = null;
NotifyPropertyChanged("SelectedItem");
//For assigning new selection
selectedItem = value;
NotifyPropertyChanged("SelectedItem");
}
I have two listboxes and i need to maintain single selection across the page within the listboxes.
Solution:
Keep SelectedItem as single and have like below
private Employee selectedItem;
public Employee SelectedItem{
get
{
return selectedItem;
}
set
{
//For clearing existing selection
selectedItem = null;
NotifyPropertyChanged("SelectedItem");
//For assigning new selection
selectedItem = value;
NotifyPropertyChanged("SelectedItem");
}