borderless window in Aero without being layered

175 views
Skip to first unread message

Robby Ingebretsen

unread,
Dec 14, 2009, 4:48:47 PM12/14/09
to wpf-di...@googlegroups.com

Hey guys. 

 

I’ve got a question related to layered windows that I’m hoping someone can help me with. I’m running into perf issues with animations in an app I’m working on. The problems all but go away if I set AllowsTransparency=”false” on the main window (which makes sense to me because of the layered windows thing).

 

This app needs custom window chrome, but it works out that the design is rectangular so I don’t need transparency. I would like disable transparency and still kill the window chrome. 

 

The problem is that this combo

 

 AllowsTransparency="False"

 WindowStyle="None"

 

…produces a window that looks like this:

 

 

 

Do Anybody know of any way to get rid of that outer border with enabling transparency?

 

Thanks!

Jeremiah Morrill

unread,
Dec 14, 2009, 4:57:29 PM12/14/09
to wpf-di...@googlegroups.com
You may need to drop down to using some Win32.  SetWindowLong may be what you are looking for.

A quick search on google for WPF + SetWindowLong came up with something that might be useful to you.

Robby Ingebretsen

unread,
Dec 14, 2009, 5:16:17 PM12/14/09
to wpf-di...@googlegroups.com

Awesome. I’ll check it out. Thanks!

 

 

From: wpf-di...@googlegroups.com [mailto:wpf-di...@googlegroups.com] On Behalf Of Jeremiah Morrill
Sent: Monday, December 14, 2009 1:57 PM
To: wpf-di...@googlegroups.com
Subject: Re: [WPF Disciples] borderless window in Aero without being layered

 

You may need to drop down to using some Win32.  SetWindowLong may be what you are looking for.

 

A quick search on google for WPF + SetWindowLong came up with something that might be useful to you.

 

On Mon, Dec 14, 2009 at 1:48 PM, Robby Ingebretsen <ro...@thinkpixellab.com> wrote:

Hey guys. 

 

I’ve got a question related to layered windows that I’m hoping someone can help me with. I’m running into perf issues with animations in an app I’m working on. The problems all but go away if I set AllowsTransparency=”false” on the main window (which makes sense to me because of the layered windows thing).

 

This app needs custom window chrome, but it works out that the design is rectangular so I don’t need transparency. I would like disable transparency and still kill the window chrome. 

 

The problem is that this combo

 

 AllowsTransparency="False"

 WindowStyle="None"

 

…produces a window that looks like this:

 

Error! Filename not specified.

Jeremiah Morrill

unread,
Dec 14, 2009, 5:39:05 PM12/14/09
to wpf-di...@googlegroups.com
Sorry for the VB.NET link though...It's hard for me to follow at least.  If you need any help getting it in C#, just hit me up.

-Jer

Robby Ingebretsen

unread,
Dec 14, 2009, 8:33:36 PM12/14/09
to wpf-di...@googlegroups.com

Thx dude. It’s kinda funny to see interop stuff in VB…not what I’m used to. I think I can sort it out though.

Paul Stovell

unread,
Dec 14, 2009, 9:56:11 PM12/14/09
to wpf-di...@googlegroups.com
Hi Robby,

I might be missing something but I think setting ResizeMode="None" will remove that extra chrome and you can keep allowstransparency=false. It's only there so the user can resize the window.

Paul
--
Paul Stovell

Mike Brown

unread,
Dec 14, 2009, 10:47:12 PM12/14/09
to wpf-di...@googlegroups.com
I think I saw a blog post on various methods of doing custom chrome in WPF...wish I could remember where though.

Robby Ingebretsen

unread,
Dec 15, 2009, 12:51:35 AM12/15/09
to wpf-di...@googlegroups.com

You rocked it! Yeah, that does exactly what I want. I knew there had to be a way J

 

Thanks man!

Andrew

unread,
Dec 15, 2009, 9:18:23 AM12/15/09
to wpf-di...@googlegroups.com
I think this is probably what you were thinking of:


From: Mike Brown <mbro...@gmail.com>
To: wpf-di...@googlegroups.com
Sent: Mon, December 14, 2009 10:47:12 PM

Jeremiah Morrill

unread,
Dec 15, 2009, 1:30:55 PM12/15/09
to wpf-di...@googlegroups.com
Leave it up to me to suggest the harder solution in Win32. =X  I'm like the guy who only owns a hammer...
Reply all
Reply to author
Forward
0 new messages