1

我有WinForm想要放入 WPF DropDownButtons(Extended WPF Toolkit) 的控件DropDownContent。将控件放到 WindowsFormsHost 上,而那个控件是DropDownContent无效的。Winforms 控件不可见。在模板中,DropDownContent属性是ContentPresenter.

StackPanel, Grid如果我想用一个通用容器(等)来尝试整个故事,它可以正常工作。

有谁知道我该如何解决这个问题?

4

1 回答 1

2

DropDownButton 有一个 Popup,其 AllowsTransparency 设置为 true - 请参见此处的模板。您不能将 WindowsFormsHost 放入 AllowsTransparency 为 true 的弹出窗口中。您必须修改 DropDownButton 的模板,使其 AllowsTransparency 为 false。

于 2011-11-21T12:51:20.620 回答