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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
猜你喜欢
  • 2021-07-14
  • 2022-12-23
  • 2021-09-06
  • 2021-11-23
  • 2021-11-16
  • 2022-12-23
  • 2022-02-09
相关资源
相似解决方案