mauede
Well-known member
When the user changes his/her mind and selects another item (a CT scan) of a ListBox, I need to erase the content of another three ListBoxes. I do that through the following statements:
where "StructSets" is the name of one of my ListBoxes.
To my dismay, the first statement triggers the "StructsSets_Selection_Changed" Event Handler that causes a
System.NullREferenceException because that code unit is not reached through the sequence of the expected steps
I need such an Event Handler to be triggered when the user selects a ListBox item clocking on it.
Should I use a different event for the code to be alerted when a ListBox item is selected through the mouse?
Thank you
C#:
StructSets.ItemsSource = null;
StructSets.Items.Clear();
StructSets.Items.Refresh();
where "StructSets" is the name of one of my ListBoxes.
To my dismay, the first statement triggers the "StructsSets_Selection_Changed" Event Handler that causes a
System.NullREferenceException because that code unit is not reached through the sequence of the expected steps
I need such an Event Handler to be triggered when the user selects a ListBox item clocking on it.
Should I use a different event for the code to be alerted when a ListBox item is selected through the mouse?
Thank you