IWpfKeyboardTrackingService Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Important
This API is not CLS-compliant.
Defines a MEF service responsible for tracking the keyboard in hosts of the WPF editor. Keyboard tracking is necessary as some hosts (such as VisualStudio) do their own keyboard handling, causing inconsistent behavior of WPF elements, even when they have keyboard focus. By tracking the keyboard, all keyboard events will be routed to WPF first, giving focused WPF controls a shot at handling keyboard events.
public interface class IWpfKeyboardTrackingService
public interface class IWpfKeyboardTrackingService
__interface IWpfKeyboardTrackingService
[System.CLSCompliant(false)]
public interface IWpfKeyboardTrackingService
public interface IWpfKeyboardTrackingService
[<System.CLSCompliant(false)>]
type IWpfKeyboardTrackingService = interface
type IWpfKeyboardTrackingService = interface
Public Interface IWpfKeyboardTrackingService
- Attributes
Remarks
Keyboard tracking is necessary because some hosts, such as VisualStudio, do their own keyboard handling, causing inconsistent behavior with WPF elements even when they have keyboard focus. By tracking the keyboard, all keyboard events will be routed to WPF first, giving focused WPF controls a chance to handle keyboard events in a consistent manner.
Methods
BeginTrackingKeyboard(IntPtr, IList<UInt32>) |
Starts tracking the keyboard. Once called, all keyboard events will be routed to WPF first, before the host application sees them. |
EndTrackingKeyboard() |
Stops tracking the keyboard. |