System.Windows.Forms.Integration 命名空间

System.Windows.Forms.Integration 命名空间

.NET Framework 4.5
 
 
 
 
此主题尚未评级 - 评价此主题
 

 

包含支持 Windows 窗体 和 WPF 控件互相操作的类。

System.Windows.Forms.Integration 命名空间包含支持 Windows 窗体和 WPF 技术互相操作的类。 使用 System.Windows.Forms.Integration 类时,可以在 WPF 页面和基于 Windows 窗体的应用程序中的 WPF 元素中承载 Windows 窗体控件。

实现互操作功能的两个关键类是 WindowsFormsHost  ElementHost 使用哪个类取决于控件的实现:

  • 当必须在 WPF 页面中使用 Windows 窗体 控件时,使用 WindowsFormsHost 类。

  • 当必须在基于 Windows 窗体 的应用程序中使用 WPF 元素时,使用 ElementHost 类。

 说明
公共类 ChildChangedEventArgs  WindowsFormsHost.ChildChanged  ElementHost.ChildChanged 事件提供数据。
公共类 ElementHost 可用于承载 Windows Presentation Foundation (WPF) 元素的 Windows 窗体 控件。 
公共类 IntegrationExceptionEventArgs 提供 EventArgs 类的基类,这些类支持有选择地引发异常。
公共类 LayoutExceptionEventArgs  LayoutError 事件提供数据。
公共类 PropertyMap 提供一种在 Windows 窗体控件和 Windows Presentation Foundation (WPF) 元素之间转换属性值的方法。
公共类 PropertyMappingExceptionEventArgs  PropertyMappingError 事件提供数据。
公共类 WindowsFormsHost 允许在 WPF 页面上承载 Windows 窗体控件的元素。
 委托说明
公共委托 PropertyTranslator 为宿主控件的映射属性提供转换功能。
posted @ 2012-10-09 10:31  开源控Meteor(OSMeteor)  阅读(654)  评论(0编辑  收藏  举报