Wpf 简明教程
WPF - Input
借助 Windows Presentation Foundation (WPF),应用程序可以通过鼠标、键盘和触控面板等多种设备获取输入。在本篇中,我们将讨论 WPF 应用程序可处理的以下类型的输入 -
Windows Presentation Foundation (WPF) provides a powerful API with the help of which applications can get input from various devices such as mouse, keyboard, and touch panels. In this chapter, we will discuss the following types of input which can be handled in WPF applications −
Sr. No. |
Inputs & Description |
1 |
MouseThere are different types of mouse inputs such as MouseDown, MouseEnter, MouseLeave, etc. |
2 |
KeyboardThere are many types of keyboard inputs such as KeyDown, KeyUp, TextInput, etc. |
3 |
ContextMenu or RoutedCommandsRoutedCommands enable input handling at a more semantic level. These are actually simple instructions as New, Open, Copy, Cut, and Save. |
4 |
Multi TouchWindows 7 and its higher versions have the ability to receive input from multiple touchsensitive devices. WPF applications can also handle touch input as other input, such as the mouse or keyboard, by raising events when a touch occurs. |