【发布时间】:2017-01-03 10:16:39
【问题描述】:
我刚开始学习 WPF,我一直在尝试将这个 WPF 控件添加到常规 WinForm 中。
我知道我可以使用Forms.Integration.ElementHost 在 WinForm 中托管 WPF 控件。但由于StatusStrip 采用Items 而不是Controls,它会将ElementHost 标记为不兼容。
我是否需要将整个 StatusStrip 替换为 WPF ToolBar 才能正常工作?
【问题讨论】:
-
是的,您可以使用
ToolStripControlHost来托管元素主机。
标签: wpf winforms statusstrip toolstripbutton windowsformsintegration