Transparent Application Window in WPF
I still see lots of questions on how to make a main application window transparent or semi-transparent. This was a bit involved in versions of WPF previous to the June CTP and was not very practical because it could not be rendered in hardware. But functionality added to WPF since has made it easy to accomplish and it supports hardware rendering when available. All you need to do is to base your main scene on the Window class and add the following code to the constructor:
this.WindowStyle = WindowStyle.None;
this.AllowsTransparency = true;
this.Background = new SolidColorBrush(System.Windows.Media.Color.FromArgb(0, 34, 34, 34));
Note that the amount of transparency, or more correctly, opaqueness, is set by the alpha channel which is the first number in the FromArgb method. Setting the alpha channel to 1.0 would be 100% opaque. 0 is 0% opaque and .5 is 50% opaque.
-MGE
September 8th, 2007 at 8:58 am
Please send me the source code details for, how to upload and display the xbap file in .net application