'System.Windows.Input.Key' 和 'System.Windows.Forms.Keys'互转

Keys formsKey = ...;
Key wpfKey = ...;
wpfKey = KeyInterop.KeyFromVirtualKey((int)formsKey);
formsKey = (Keys)KeyInterop.VirtualKeyFromKey(wpfKey);

 

posted @ 2020-08-03 14:41  dyfisgod  阅读(610)  评论(0编辑  收藏  举报