I am using a window to change database configuration for my application. Settings button click is handeled by Config(), it show settings windows when clicked. If I close the
If closing the window via something other than OK and Cancel buttons is your problem, you need to handle the Window.Closing event (see the link for an example).