WPF not rendering on remote desktop
Asked Answered
N

7

9

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?

Nidia answered 7/8, 2009 at 10:18 Comment(1)
It appears that this is somthing that MS have fixed in the final release of Win7. I'm now able to view the app running on a win7 box, from machines running both XP and Win7. Thanks you your help. Lets hope they've also put this fix into vista as well.Nidia
A
10

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.

Anastassia answered 3/11, 2009 at 17:31 Comment(5)
I have been having problems with a WPF application showing completely blank under several different remote support applications (TeamViewer, Zoho, GotoAssist) when the screen is unplugged. This did the trick! Note, I had to create that registry key, it wasn't there already.Flout
This worked for me. I was running a VS 2015 on a remote (Teamviewer) computer with no display attached to it. The WPF controls were invisible, but no errors reported. I downloaded a DirectX benchmarking app from Guru3D and it behaved that same way...which makes me think it has something to do with DirectX. Anyway, this appears to have worked around the issue, but I hate making registry entries.Brockman
This fixed it for me. VS 2019 through Chrome Remote Desktop.Pangolin
This solution absolutely works if you're using a remote connection to a headless machine. I've used it for several years and still use it today on Windows 10. I've also installed "dummy/virtual" display adapters, which also solves this issue but costs actual money.Rhizome
fixed it for me, also VS2019 through Chrome Remote Desktop. Thank you so much!Reeba
U
2

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?

Unscientific answered 10/9, 2009 at 17:43 Comment(0)
A
1

I just had this problem with the ribbonwindow not displaying correctly when testing for the first time via RDP - the transparent background was white, the close minimize/maximize buttons were missing, the rounded corners on the bottom of the window were square, and the top row of ribbon buttons were almost impossible to select.

Turns out there was a simple fix for me. Right-click the RDP connection icon (I have it saved on my desktop), select "Edit", then the "experience" tab, and change "detect connection quality automatically" to "LAN (10 Mbps or higher)".

This fixed it for me.

Ade

Analeptic answered 2/11, 2015 at 11:23 Comment(1)
for me, just one view in WPF .NET 5 app was not rendering if "auto" was selected... selecting "LAN (10 Mbps or higher)" solved the problemBiddy
F
0

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.

Forklift answered 7/8, 2009 at 10:27 Comment(1)
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.Nidia
M
0

I have the same problem than the asker. The standard, out-of-the-box Checkbox is not rendering correctly. I can only see if it is checked when hoovering the checkbox. Otherwhise, no difference between checked and unchecked. Important note : It occurs when setting the foreground to white (see here : https://social.msdn.microsoft.com/Forums/vstudio/en-US/1c03db49-7e53-4cbb-9dd1-b328017c4453/wpf-checkbox-and-radiobutton-check-mark-not-showing-under-xp-windows-classic-theme-and-remote?forum=wpf)

Mok answered 28/9, 2016 at 19:8 Comment(0)
C
0

Our application used to have this problem with a custom progress bar. We fixed this by setting the background color of the Border control to White. This leads me to think there is an issue with transparent backgrounds

Chiropteran answered 29/8, 2018 at 17:51 Comment(1)
I've had much the same experience. On WPF Windows that implement a blur via the SetWindowCompositionAttribute API.Etheline
B
-5

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.

Bozarth answered 11/1, 2010 at 18:21 Comment(2)
I have this problem too. Your answer is totally misleading, and makes peoples think that the question is wrong.Mok
Bad answer. Just because YOU don't have the problem doesn't mean the problem doesn't exist.Mantis

© 2022 - 2024 — McMap. All rights reserved.