winform 和wpf技术有不同的属性模型,Property mapping 支持这两种技术之间的互操作性并且提供以下capabilities:
Makes it easy to map relevant property changes in the host environment to the hosted control or element.
Provides default handling for mapping the most commonly used properties.
Allows easy removal, overriding, or extending of default properties.
Ensures that property value changes on the host are automatically detected and translated to the hosted control or element.
(1)从wpf到winform的映射:在wpf中需要用到WindowsFormsHost控件
二者之间可映射的属性详情见:https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/advanced/windows-forms-and-wpf-property-mapping?view=netframework-4.8
(2)从winform到wpf的映射:在winform中需要用到elementhost控件
二者之间可映射的属性见:https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/advanced/windows-forms-and-wpf-property-mapping?view=netframework-4.8
实例见:https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/advanced/walkthrough-mapping-properties-using-the-elementhost-control
winform elementhost控件属性到wpf控件属性的映射以及wpf winformHost控件属性到winform控件属性的映射
原文:https://www.cnblogs.com/long612-/p/11911718.html