c# - WPF - Fire comboBox SelectedIndexChanged only from user click -


i want stop combobox_selectionchanged event being fired @ ui loading. should happen when user makes change in combo box.

to this, have written following in .xam.cs file.

  private void mycombobox_selectionchanged(object sender,   selectionchangedeventargs e)       {         combobox cb = (combobox)sender;         if (!cb.isfocused)         {             return;         }         else            viewmodel.onpropertychanged("myproperty");      } 

but not fire event when user makes change. have gone wrong ?

i know there similar question in stackoverflow. solutions in did not work me. pls help.

found solution. need combine selection_changed event previewmousedown event.

could selectionchanged event in wpf handled user interaction?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -