How to open a child windows under parent window on menu item click in WPF?

前端 未结 1 2201
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-20 08:46

I am developing an application in C#. I\'m using .Net under WPF. I want to open a new child window (like a dialog) and it should open within the main window, just below the menu

1条回答
  •  渐次进展
    2021-02-20 09:25

    Try this.

    MyChildWindow cw = new MyChildWindow();
    cw.ShowInTaskbar = false;
    cw.Owner = Application.Current.MainWindow;
    cw.Show();
    

    0 讨论(0)
提交回复
热议问题