Visibility
For controls and panels, there is a huge difference between Visibility.Collapsed
and Visiblity.Hidden
. Hidden reserves the space of the invisible element, Collapse frees the used space. This can make a big difference in an UI.
Using the same enumeration for the visibility of the window-class is IMO first of all a question of holding a constancy in the class-library, but may be it makes also some other finer differences.
Restart
If there is a possibility to directly restart the app, I don't know. What you can try is to use App.Current.Shutdown()
to close the app and start a new instance through System.Diagnostics.Process.Start()
where the path to the app can be taken from System.Reflection.Assembly.GetEntryAssembly()
. `.