How Not To Restart A ClickOnce Application

Normally if you need to restart a WPF application programatically, you would use the following code: private void Restart() { System.Diagnostics.Process.Start( Application.ResourceAssembly.Location); Application.Current.Shutdown(); } If you have a ClickOnce WPF application, you do not want to do this. In order to understand why, you need to understand how a ClickOnce application is normally launched. The shortcut you click on in the Start menu is not a normal shortcut to an executable....

October 20, 2012

Borderless WPF Window

I’ve put together a very simple borderless WPF window that complements Microsoft’s Metro style quite well. I won’t go into a lot of detail here, since the code does most of the talking, but I will go over the important parts here. If you want to skip right to the source code, you can find it over at GitHub: http://bit.ly/N7afKQ Starting with a fresh window set and the window properties WindowStyle="None", AllowsTransparency="True", and ResizeMode="CanResizeWithGrip"....

June 30, 2012