System.Windows.Forms.Integration 命名空间
System.Windows.Forms.Integration 命名空间
包含支持 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 | 为宿主控件的映射属性提供转换功能。 |
作者:Meteor
出处:http://www.cnblogs.com/osmeteor/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
如果您看了本篇博客,觉得对您有所收获,请点击右下角的 [推荐]