Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用元素主机在win表单中托管了一个wpf控件,并希望在wpf中排列子元素并设置他们的文档以正确填写表单,我尝试使用DockPanel.SetDock但set not不在dockpanel类中,当然我尝试添加 system.windows.controls.dockpanel 命名空间,但列表中唯一的项目是“primitives”,PresentationFramework.dll 和 PresentationCore.dll 已经添加到引用中。我应该怎么做才能解决这个问题?谢谢!
根据我的经验,DockPanel 总是一个问题。将您的自定义控件放置在没有垂直和水平对齐的网格内。