我需要在代码后台创建并添加一些项目到弹出窗口。在XAML中很容易实现:
<Popup StaysOpen="False">
<DockPanel>
//Items here
</DockPanel>
</Popup>
我认为“Child”是我需要添加项目的地方,但我没有看到任何“添加”,“项目”,“来源”或“内容”。有人知道如何做吗?
Popup myPopup= new Popup();
myPopup.Child // ... need to add items there