title: Tab control selection changed event called if i select tree view item inside the tabitem MVVM
body: <p>I have a custom control. In custom control i have used tab control to display the some list items. In tab control i have 3 tab items. If i click first tab item some operation will happen. i have treeview structure in second tab. If i expand the treeview the tree view is not expanded instead of that i was navigated to first tab. I have used interaction event trigger for selectionchanged event. but i faced the problem. I hope i will get solution or some idea after post this. </p>
  
  <p>Hi, if i use other than tree view inside the tabitem i faced the same error. I think i done mistake in xaml part. Please find the xaml part of my code, </p>
  
  <pre><code>&lt;i:Interaction.Triggers&gt;
      &lt;i:EventTrigger EventName="SelectionChanged"&gt;
          &lt;action:TabSelectionAction TargetObject="{Binding ElementName=DataTabName}" /&gt;
      &lt;/i:EventTrigger&gt;
  &lt;/i:Interaction.Triggers&gt;
  </code></pre>
  
  <p>In this DataTabName is the name of the tab control. I have tried with CustomControlName as TargetObject if i used this i have faced <code>"Target = 'Target' threw an exception of type 'System.InvalidOperationException'"</code>exception so i have set the tabcontrol name as targetobject. </p>
  
  <p>My action class like this: (I have used this action class at the time of getting exception)</p>
  
  <pre><code>internal class TabSelectionAction : TargetedTriggerAction&lt;ClassNameofCustomControl&gt;
  {
      protected override void Invoke(object parameter)
      {
          if ((parameter as SelectionChangedEventArgs).OriginalSource is TabControl)
          {
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p>Regards,
  Devi</p>