views:

842

answers:

4

I'm having problems with the rendering of a WPF app over a remote desktop connection.

The applications chrome is rendering, but none of the content is coming through, as if the window is not drawing. Instead the previous content of the screen is showing in it's place.

This has been a problem with the application running on both Vista & Win 7, with remote control being taken from XP and Win7.

The problem is not application specific, if I create a new WPF app, with just a textblock on the window, it will also not run. (Neather will the windows preview in VS2008 display.)

Is there some trick to getting WPF running under RDP?

A: 

Did you also try Win7 latest RDP - Win7 connection? The thing is WPF doesn't use GDI to draw elements.

VNC clients (like UltraVNC) probably will do the trick for you as they using much simplier algorithms more like of sending bitmaps.

Ray
Yeah, I'm currently running Win7 to Win7 (7100) RDP, but it's had no effect.I wouldn't go vnc to be honest, this is currently a one off, personal application running on my home machine that I would like to be able to monitor remotely. If I can't do it via RDP, I'm more likely to move it to WinForms and change remote access software. Google / Bing searches show that it should be possible to do this over RDP. I've not been able to find another example of this problem.
MrLink
+1  A: 

WPF should render over RDP; it's smart enough to know when it can render in hardware, and when it can't it reverts to its own GDI+ based software rendering. I would make sure you're running .NET Framework 3.5 SP1 on the remote machine, since there were changes to remoting that might pose issues. (See link below.)

I've been developing a WPF app for the past 6 months and it works just fine over RDP. (From Vista and Win7 to XP, Vista and Server 2003.) One important caveat, however, is that it renders using the Classic theme. So if you're using controls that don't have a classic theme, they won't render. If you're just dropping a TextBox on a Window, then obviously that's not your problem.

Check out this question for some links that may be helpful: Are there problems with rendering WPF over Remote Desktop under Windows XP?

AndyM
A: 

I read on Kevin Dente's blog (from a twitter post) that he was having trouble with WPF apps in virtual machines. While not the same as Remote Desktop, it's possible the problem could be the same. Kevin was able to fix his problem by disabling hardware accelleration by creating a DWORD registry value at

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\DisableHWAcceleration

and then setting it to 1.

His original blog post is here: http://weblogs.asp.net/kdente/archive/2009/10/19/visual-studio-2010-beta-2-editor-performance-fix-running-on-a-virtual-machine.aspx

That may not be your exact solution, but maybe it points you in the right direction.

Ben McCormack
A: 

There is no special trick needed to get WPF content to show across remote desktop. Our WPF-based app renders just fine over RDP (tried from numerous machines) with no problems. We're even using animations, gradients, WriteableBitmap, etc. w/ no problems.

jschroedl