title: Make Window Close, but application stay alive using user control
body: <p>That question may need to be revised. I'm making a C# WPF program that will be deployed on multiple Tablets. Each of those tablets have different resolutions and orientations. This is why I'm using WPF. So I decided to make a Window foreach tablet. Since this window is to configure the program I decided to make "Buttons" (user controls) that have the mouse down property filled in with what I want that particular button to do. I started with the Close buttons since I figured it would be the easiest. I go the close button looking good on the Window and in that particular Tablet. The Window's ShowDialog method is called by the main application (winforms... it is slowly transitioning to use WPF entirely) I tried setting the DialogResult but I was getting a NullReference Error. I tried Application.Current.ShutDown() (which Current is null) So I'm not sure how to do this. The end game I want to be able to just add a button (say to setup the com port) to the window and that button works with no addtional code.</p>