如何在wpf aaplication中打开窗口? [英] how to open window in wpf aaplication?
本文介绍了如何在wpf aaplication中打开窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
需要你的帮助我正在研究WPF项目它工作得很好......现在它的设置来自......(我的项目在后台运行)现在我想要刺穿一些可以调用设置形式的快捷键,即CTRL + ALT + S
请帮助我。
任何帮助将不胜感激。
Lakhan
Hello friends,
Need ur help i am working on WPF project it working fine...now its consist a settings from ...(my project is running on back ground)now i want to impalement some short cut key which can invoke the setting form i.e CTRL+ALT+S
Please help me .
Any Help will be appreciated.
Lakhan
推荐答案
private void YourEventHandler(object sender, KeyEventArgs e)
{
if (System.Windows.Input.Keyboard.IsKeyDown(System.Windows.Input.Key.S) &&
System.Windows.Input.Keyboard.IsKeyDown(System.Windows.Input.Key.LeftCtrl) &&
System.Windows.Input.Keyboard.IsKeyDown(System.Windows.Input.Key.LeftAlt))
{
// new SettingsWindow().ShowDialog();
}
}
这篇关于如何在wpf aaplication中打开窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文