Related questions
How do you center your main window in WPF?
I have a WPF application and I need to know how to center the wain window programatically (not in XAML).
I need to be able to do this both at startup and in response to certain user events. It has …
WPF App Doesn't Shut Down When Closing Main Window
I'm used to WinForms programming in Visual Studio, but I wanted to give WPF a try.
I added another window to my project, called Window01. The main window is called MainWindow. Before the public MainWindow() constructor I declare Window01:
Window01 …
WPF: Cannot reuse window after it has been closed
I am trying to keep one instance of a Window around and when needed call ShowDialog. This worked find in winforms, but in WPF I recieve this exeception:
System.InvalidOperationException: Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle …