Drawing shapes without using a window

Hi All,

I am wanting to draw shapes on the screen using WPF but without drawing them
onto a window. Is this possible and if so how do I do this?

Many thanks,

Charles

[233 byte] By [ChuckHar] at [2008-1-10]
# 1

Well you need a Window, but it doesn't necessarily have to have any visual representation. You can remove the standard chrome and give it a transparent background like so:


Code Snippet
<Window WindowStyle="None" Background="Transparent" AllowsTransparency="True" ....

Please be aware of the impact this will have on rendering performance under 3.0 on Windows XP where this type of window is no longer hardware accelerated.

HTH,
Drew

DrewMarsh at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2

Please be aware of the impact this will have on rendering performance under 3.0 on Windows XP where this type of window is no longer hardware accelerated.

Actually, I just discovered today there's a hotfix out for DirectX which resolves this issue. They say not to install it unless you actually see the problem, but it seems to me that anyone running WPF apps now will see it. I suspect it'll make it into Windows Update eventually but I requested the hotfix nonetheless.

http://support.microsoft.com/kb/937106/en-us

PatrickSears at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 3

Sure, if that's viable for you then go for it. The fix will also be included as part of the .NET 3.5 release, so no special hotfixes will be necessary.

Cheers,
Drew

DrewMarsh at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 4
Drew Marsh wrote:

Sure, if that's viable for you then go for it. The fix will also be included as part of the .NET 3.5 release, so no special hotfixes will be necessary.

Cheers,
Drew

Awesome! Any idea when that's scheduled for public release?

Edit:
Oh. Duh. Probably about the same time VS2008 is publically released.

PatrickSears at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 5
Yep, it's all supposed to coincide and last I heard it's by year's end at the latest. Of course, nothing's official until Microsoft announces it.

Cheers,
Drew

DrewMarsh at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified