You can add your TabItem header in a lable then add a click event to it, below is my code demo:
The code for xaml:
<Window.Resources>
<Style TargetType="Label" x:Key="myLable">
<Setter Property="Height" Value="25"></Setter>
<Setter Property="Width" Value="50"></Setter>
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="Label_PreviewMouseLeftButtonDown"></EventSetter>
</Style>
</Window.Resources>
<Grid Name="Mygrid">
<TabControl Name="mytab" SelectedIndex="0">
<TabItem>
<TabItem.Header>
<Label Content="123" Style="{StaticResource myLable}"></Label>
</TabItem.Header>
<StackPanel>
<TextBox x:Name="txtFocused">123</TextBox>
<TextBox>123</TextBox>
</StackPanel>
</TabItem>
<TabItem >
<TabItem.Header>
<Label Content="123" Style="{StaticResource myLable}"></Label>
</TabItem.Header>
<StackPanel>
<TextBox>223</TextBox>
<TextBox>432</TextBox>
</StackPanel>
</TabItem>
</TabControl>
</Grid>
The code for Label_PreviewMouseLeftButtonDown event is same as TimonYang-MSFT.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.