Mouse translation from System.Windows.Forms.MouseButtons to System.Windows.Input.MouseButton
来源:互联网 发布:java中排序函数 编辑:程序博客网 时间:2024/06/05 03:46
In the UI world, there are two system, the Winforms and the WPF. The WPF ones come later and have a face lift on the overall classes and designs.
The team has made tremendous effort to bridge the two world. However, situation exists that you have to convert between the two of them , for example the MouseButton class.
- System.Windows.Forms.MouseButtons
- System.Windows.Input.MouseButton
Below shows the conversion code that does the code between the two.
private static MouseButton ToMouseButton(Forms.MouseButtons button) { switch (button) { case Forms.MouseButtons.Left: return MouseButton.Left; case Forms.MouseButtons.Right: return MouseButton.Right; case Forms.MouseButtons.Middle: return MouseButton.Middle; case Forms.MouseButtons.XButton1: return MouseButton.XButton1; case Forms.MouseButtons.XButton2: return MouseButton.XButton2; } throw new InvalidOperationException(); }
- Mouse translation from System.Windows.Forms.MouseButtons to System.Windows.Input.MouseButton
- System.Windows.Forms.Cursor
- System.Windows.Forms.Application.StartupPath
- System.Windows.Forms.AxHost+InvalidActiveXStateException
- System.Windows.Forms.Timer[C#]
- System.Windows.Forms.Application.DoEvents()
- 浅谈System.Windows.Forms.SystemInformation类
- framework 2.0 源代码(System.Windows.Forms)
- System.Windows.Forms.DataGridView的使用总结
- 继承重写 System.Windows.Forms.DataGridTextBoxColumn类
- mshtml与System.Windows.Forms.HtmlElement
- System.Windows.Forms.Timer定时器的“自毁”
- 解决“System.Windows.Forms.AxHost+InvalidActiveXStateException”异常
- Unity3D使用System.Windows.Forms.dll
- System.Windows.Forms.PropertyGrid 属性控件
- 模拟键盘事件 System.Windows.Forms.SendKeys
- WPF中加载System.Windows.Forms;
- Unity-使用System.Windows.Forms.dll
- iOS开发框架介绍(二)---iOS 框架及开发相关信息
- Android Native CPU ABI Management
- 黑马程序员:=与equal的区别
- iOS开发框架介绍(一)---iOS开发介绍
- 软件开发之动物庄园
- Mouse translation from System.Windows.Forms.MouseButtons to System.Windows.Input.MouseButton
- 黑马程序员:new与getInstance的区别
- 消息队列(MSMQ)学习
- EC标签笔记
- myeclise 上传文件 内存溢出问题
- Linux cciss磁盘设备文件的说明
- 黑马程序员:final到底修饰了什么
- kmalloc和vmalloc
- 中小型局域网构建实践 PDF高清版