I have a ListBox control with IntegerUpDown in each ListBoxItem. Everything works fine, but when the IntegerUpDown reaches the min or the max I set, If I click on the disabled arrows it'll trigger a selectionchanged event for the listbox. Disabled arrow
private void lbItem_SelectionChanged(Object sender, SelectionChangedEventArgs e)
{
if (//e.source != integerupdowncontrol)
//update other view, etc.
}
Have you tried hooking into the selectionchanged event, checking for your disabled condition, and if disabled set the
SelectionChangedEventArgs.Handled
totrue
?SelectionChangedEventArgs MSDN
Here is another example with keypressed