Reputation: 13
I'm working with the WPF TabControlEx (close tabs).
I'm looking a way to close the tab clicking the tab header with the mouse wheel click.
Any suggestions?
Thanks a lot for all your help
Upvotes: 1
Views: 326
Reputation: 15413
Add this to your XAML on the tab header:
<Grid.InputBindings>
<MouseBinding MouseAction="MiddleClick" Command="{Binding CloseCommand}" />
</Grid.InputBindings>
Have your CloseCommand
on your ViewModel close the tab. You might also need to pass the specific tab in with the CommandParameter
.
Upvotes: 1
Reputation: 5462
The Project i was developing was for different purpose but it had the closable tabs if you want to use it you can find it in this forum
Upvotes: 0