.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> WPF >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Create Transparent Window in WPF Application

Posted By:Diptimaya Patra       Posted Date: April 14, 2010    Points: 25    Category: WPF    URL: http://www.dotnetspark.com  

Create Transparent Window in WPF Application. In this article I will guide you through how to use it. Remember Transparent Windows is not available in Windows XP by default Shell, but in Windows Vista and Windows 7 the Shell supports Transparency.
 

Introduction

I was searching for a Transparent Window style in WPF. And I found this in codeplex as FluidKit. In this article I will guide you through how to use it. Remember Transparent Windows is not available in Windows XP by default Shell, but in Windows Vista and Windows 7 the Shell supports Transparency.

Creating WPF Application

Fire up Visual Studio and create a WPF Application, name it as GlassWindowSample.

image1.gif

Now a WPF User Control Library to the Solution, name the project as GlassLibrary.

image2.gif

After creating the WPF User Control Library, add the Controls and Themes to the Project and remove the default UserControl.xaml and UserControl.xaml.cs files.

Your WPF User Control Library project structure would look like as follows:

image2.3.gif
Change the namespace of the application wherever required in this project.

Then add the Project reference to the Main WPF Application project.

image2.5.gif

Add the reference in Window1.xaml of main application.

xmlns:Controls="clr-namespace:GlassLibrary.Controls;assembly=GlassLibrary"

Change the xaml mark up as the Custom Window as follows:


  

   


Remove the Window refernce in code behind.

image2.8.gif

That's it. Now run the application and you would see the Transparent Window. Use different controls inside the Grid to have the Application ready for you.

image3.gif

Download Link from Code Plex: http://fluidkit.codeplex.com/SourceControl/ListDownloadableCommits.aspx
 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend