我有page.xaml和childwindow。如何从page.xaml关闭子窗口。例如,在page.xaml中单击按钮。如何从代码中获取此childWindow?
发布于 2010-12-03 09:37:51
将您的ChildWindow示例命名为x:Name="myChildWindow“在您的代码中的page.xaml按钮下,单击事件put this
myChildWindow.Close();发布于 2010-12-02 02:48:08
我相信在ChildWindow对象上有一个Close方法。通过调用此方法,窗口将关闭。
See the MSDN documentation.
https://stackoverflow.com/questions/4325174
复制相似问题