I am trying to make the corners of a Window (WPF) rounded and it doesn't work, I tried to make the window itself transparent and add an internal border with rounded corners and it doesn't work.
any ideas?
I am trying to make the corners of a Window (WPF) rounded and it doesn't work, I tried to make the window itself transparent and add an internal border with rounded corners and it doesn't work.
any ideas?
you need to set WindowStyle to WindowStyle.None, which will remove the chrome, then you can allow transparency which is an attribute int the Window element, and set the background color to transparent. All of this can be done as attributes to the window tag.
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
To make the corners rounded, use a border and set the cornerRadius property
You also need to make a transparent border around your window that's a few pixels wide, or else the edges of your rounded corners get cut off
Don't use AllowsTransparency it's slow and buggy, take a look at this link, look for the section "Office 2007 without Aero – Or, you are responsible for everything":
http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx
EDIT: some of the techniques in this post are specific to Vista, but the "Office 2007 without Aero" section works on XP (and actually describes what software that is written for Vista has to fall-back to on XP).