IWpfKeyboardTrackingService 接口

定义负责在 WPF 编辑器的宿主中跟踪键盘的 MEF 服务。

命名空间:  Microsoft.VisualStudio.Language.Intellisense
程序集:  Microsoft.VisualStudio.Language.Intellisense(在 Microsoft.VisualStudio.Language.Intellisense.dll 中)

语法

声明
Public Interface IWpfKeyboardTrackingService
public interface IWpfKeyboardTrackingService
public interface class IWpfKeyboardTrackingService
type IWpfKeyboardTrackingService =  interface end
public interface IWpfKeyboardTrackingService

IWpfKeyboardTrackingService 类型公开以下成员。

方法

  名称 说明
公共方法 BeginTrackingKeyboard 开始跟踪键盘。
公共方法 EndTrackingKeyboard 停止跟踪键盘。

页首

备注

键盘跟踪是必需的,因为某些主机,如 VisualStudio,执行过程中的键盘,导致与 WPF 元素的不一致的行为,即使具有键盘焦点。 通过跟踪键盘,所有键盘事件都将先路由到 WPF,获得焦点的 WPF 控件机会处理键盘事件以一致的方式。

请参阅

参考

Microsoft.VisualStudio.Language.Intellisense 命名空间