Partilhar via


IWpfKeyboardTrackingService Interface

Defines a MEF service responsible for tracking the keyboard in hosts of the WPF editor.

Namespace:  Microsoft.VisualStudio.Language.Intellisense
Assembly:  Microsoft.VisualStudio.Language.Intellisense (in Microsoft.VisualStudio.Language.Intellisense.dll)

Syntax

'Declaração
Public Interface IWpfKeyboardTrackingService
public interface IWpfKeyboardTrackingService
public interface class IWpfKeyboardTrackingService
type IWpfKeyboardTrackingService =  interface end
public interface IWpfKeyboardTrackingService

The IWpfKeyboardTrackingService type exposes the following members.

Methods

  Name Description
Public method BeginTrackingKeyboard Starts tracking the keyboard.
Public method EndTrackingKeyboard Stops tracking the keyboard.

Top

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.

See Also

Reference

Microsoft.VisualStudio.Language.Intellisense Namespace