I have a TabControl with two TabItems, inside the one TabItem I have a DataGrid. I'm trying to handle the TabItem click, and it works, but, when I click in one row of the "dataGrid1" the event "TabItem_MouseLeftButtonUp" of TabItem click is fired too. See the code:
<TabControl Height="211" HorizontalAlignment="Left" Margin="33,29,0,0" Name="tabControl1" VerticalAlignment="Top" Width="417" >
<TabItem Header="tabItem1" Name="tabItem1">
<Grid />
</TabItem>
<TabItem MouseLeftButtonUp="TabItem_MouseLeftButtonUp">
<DataGrid AutoGenerateColumns="True" Height="134" Name="dataGrid1" Width="307" />
</TabItem>
</TabControl>
Note: I can't use the personalize <TabItem.Header>
because I'm using MahApps, if I use TabItem.Header the style os TabItem will break.