Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windowless WPF Application [duplicate]

Tags:

c#

.net

wpf

I am hoping someone can point me in the right direction here. I am trying to turn my analog clock application into a windowless clock. I have searched google but I think my issue is I do not know the correct term for what I am trying to do.

My analog clock application is a circle that contains the clock hands. This is contained in a window like most other applications. I would like to remove the window and have only the clock show above the background. I would be able to bring up the close button maybe on mouse over. Or perhaps I could make the whole window transparent except for the clock and on mouse over I would be able to see the window and close it.

Anyone have any experience on this? Maybe some tips or a tutorial somewhere?

Thank you,

like image 922
scott lafoy Avatar asked Mar 25 '13 16:03

scott lafoy


1 Answers

You can build your Window, and set the Background="Transparent" like so:

<Window ...
   AllowsTransparency="True" 
   WindowStyle="None" 
   Background="Transparent"  >

This gives you a window with a transparent background and no border.

like image 188
Reed Copsey Avatar answered Nov 18 '22 04:11

Reed Copsey