Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
950
DocumentContent Host and TabGroupPane_SelectionChanged
posted

I Have a DocumentContentHost with several Pane.

I Manage the TabGroupPane With TabGroupPane_SelectionChanged :

private void TGPane_SelectionChanged(object sender, SelectionChangedEventArgs e)

{

 int sel = TGPane.SelectedIndex;

if (sel == 0) {    Edit first pane ].

if (sel == 1) { Edit second pane ].

 But , When I change a ListBox or Combobox of my Pane , I perform all the time the tabgrouppane_Selectionchanged :

How to avoid to repeat the tabgrouppane_selectionchanged.

Thank you  CaisseOdeV

Parents
  • 54937
    Suggested Answer
    Offline posted

    TabGroupPane is a derived TabControl which is a derived Selector and it is that that defines the SelectionChanged event. The SelectionChanged event is a routed bubble event so if it is not handled for an element within (such as your listbox/combobox within a tab) then it will bubble up to the TabControl. You need to check the e.OriginalSource to see which object is actually raising the SelectionChanged and in this case ignore it unless it is the TabGroupPane.

Reply Children