通过单击中间按钮关闭TabItem [英] Closing TabItem by clicking middle button

查看:147
本文介绍了通过单击中间按钮关闭TabItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题.在我的WPF应用程序中,如果我用鼠标中键按下tabItem,则该tabItem应该关闭.就像在FireFox中一样.但是我尝试使用MVVM来执行此操作,并且我需要使用命令.我的tabItems也是动态创建的.救救我!谢谢!

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!

推荐答案

检查tabItem的MouseDown事件.在其中找到
Check MouseDown Event of tabItem. In that you find
e.ChangedButton = MouseButton.Middle




可能会对您有帮助.




May it will help you.


这篇关于通过单击中间按钮关闭TabItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆