C# Silverlight组合框SelectionChange在表单_BeginingEdit上触发
我想问一下,当我开始编辑表单时,如何禁用combobox selectionchange事件的触发 这里的问题是,当我编辑表单时,selectionchange也会触发,我认为这会导致我的组合框具有空值 请帮忙C# Silverlight组合框SelectionChange在表单_BeginingEdit上触发,c#,wpf,silverlight,combobox,selectionchanged,C#,Wpf,Silverlight,Combobox,Selectionchanged,我想问一下,当我开始编辑表单时,如何禁用combobox selectionchange事件的触发 这里的问题是,当我编辑表单时,selectionchange也会触发,我认为这会导致我的组合框具有空值 请帮忙 谢谢。您可以取消订阅Combobox Selection changed事件,然后从代码隐藏中重新订阅 ComboBox comboBox = new ComboBox(); 订阅SelectedIndexChanged事件 comboBox.SelectedIndexChanged
谢谢。您可以取消订阅Combobox Selection changed事件,然后从代码隐藏中重新订阅
ComboBox comboBox = new ComboBox();
订阅SelectedIndexChanged事件
comboBox.SelectedIndexChanged += comboBox_SelectedIndexChanged;
使用以下代码取消订阅SelectedIndexChanged事件
comboBox.SelectedIndexChanged -= comboBox_SelectedIndexChanged;
您编辑表单的意思是,当您开始在您的组合框中键入文本时?对。我只需单击编辑图标,但我还没有在组合框上更改任何内容。