Click here to Skip to main content
15,072,311 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a problem. In my WPF application, if i press a tabItem with middle mouse button, this tabItem should close. Just like in FireFox. But I try to do this using MVVM, and i need to use commands. Also my tabItems are created dynamically. Help me plz! Thank you!
Posted
Comments
Sergey Alexandrovich Kryukov 24-Sep-11 22:23pm
   
What's the difference, commands or not? Event is event. What's the problem?
--SA
Member 7826605 25-Sep-11 9:24am
   
The problem is to handle MiddleButtonClick event on dynamically created TabItems

1 solution

Check MouseDown Event of tabItem. In that you find
e.ChangedButton = MouseButton.Middle



May it will help you.
   
v2
Comments
RaviRanjanKr 8-Dec-11 10:40am
   
A suggestion :- Its not a good practice to use short text words like u instead of using 'You' and always use Code Block and Pre tag to wrap your codes.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900