Are there problems with rendering WPF over Remote Desktop under Windows XP? - c#

I have heard that WPF primitives will not be supported by remote desktop on windows XP. The implication of this is that if you run a WPF application on a vista machine and display it on an XP machine (via remote desktop) the display will be sent as a compressed bitmap.
This issue is resolved in Vista-Vista comunication via DirectX 11 (?) but this will not be made available on XP. There is obviously a performance hit here, I would like to understand it before making any inroads into developing applications to WPF.
Some information on this topic can be found here:
http://blogs.msdn.com/tims/archive/2007/01/05/comparing-wpf-on-windows-vista-v-windows-xp.aspx
See comment from the above link (quote):
To SpongeJim's question, this is done by the MIL (media integration layer), which is the underlying core of WPF that handles composition. On a Vista/Vista remote desktop connection, the MIL primitives are remoted and then reconstituted. On other combinations (e.g. 2003/XP), what gets remoted is bitmaps, which is obviously far more bandwidth-intensive. More depth on this topic can be found on Greg Schechter's blog, and in this entry in particular: http://blogs.msdn.com/greg_schechter/archive/2006/06/09/623566.aspx
Does anyone have any experience or more up to date information on this issue?

As of .NET 3.5 SP1, all WPF graphics are remoted as bitmaps, even on Vista-to-Vista communication. From http://blogs.msdn.com/jgoldb/archive/2008/05/15/what-s-new-for-performance-in-wpf-in-net-3-5-sp1.aspx:
We now remote as bitmaps in ALL cases.
The reason is that WPF 3.5 SP1 now
uses a new graphics DLL (wpfgfx.dll)
and certain changes could not be made
to Vista’s existing graphics DLL
(milcore.dll) that is also used by
DWM.
As other commenters have noted, the performance will greatly depend on the design of your application’s UI. The potential upshot is that you only have to test in one scenario; remoting performance should now be the same regardless of the client or server.

We have had no problems using both Remote Admin and Bomgar for remoting once those apps were updated to work with WPF. We've tested XP to XP, XP to Vista, Vista to XP, and Vista to Vista. We'd initially only had problems with tooltips and combo-box drop downs/popups. For the last six months or so, things have been fine.
I just tested remoting into a Vista VM from my XP desktop and our app looked great (if running a bit slow, but it is a VM...) I switched to low quality 8-bit color and the performance problems almost completely went away. The gradiation, etc, was lost on our window background, etc, but it was definitely still usable.
I don't think you should have any functional problems, and only minor performance issues.

i guess this depends on your wpf app.
if you have lots of gradients, animations, brushes, etc...your app will definitely run slower over the wire...

Related

WPF controls not showing after windows update

After updating windows to version 1803 none of the WPF applications on a laptop (Intel hd 500 GPU) work properly anymore (start with a blank window or don't show the GUI at all). I've made a simple test app that only shows one button and it results in an empty window. If I turn off the hardware rendering (according to Software rendering mode - WPF), the application works as expected.
I've tried several versions of the GPU driver including the generic MS one, latest one, latest one recommended by the laptop manufacturer, older ones but all with the same result. The recovery point to the previous version is not available anymore.
The laptop is barely running existing applications so setting the registry not to use the hardware rendering for all the .net applications is not an option due to performance degradation.
Has anyone experienced anything similar, are any other solutions to solving this?
Thanks,
Tomislav
The issue happens because I'm using the laptop with the lid down (I connect remotely to it). This seems to put the GPU to sleep/power down state which messes up the applications that use GPU acceleration. Interestingly desktop and some applications run normally.
Adding a fake display solved the issue (https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/Working-with-closed-lid/td-p/1623610, https://superuser.com/questions/1271344/fake-montitor-for-teamviewer-on-laptop-with-closed-lid).
I have also had this issue and have found that if you uninstall and delete the Intel Display Adapter, then let Windows automatically find the default, this issue is resolved.

WPF visual problems on Windows XP

We have a huge project in WPF .NET 4.0 which should support Windows XP SP3 and above. (hence the use of .NET 4.0) It has no problems whatsoever on Windows 7 and 8/8.1. However we're experiencing major visual issues when running on Windows XP to the point that the application is unusable.
I searched a lot and came across some similar questions such as this one but none of the suggested solutions worked for us.
Here's an screen shot taken on Windows XP SP3:
The odd thing here is that there is clone of "28" TextBlock you see in the screen shot, to the left of it. They have everything in common except their name but the left one is not rendered properly!
And here is how it really looks like (taken on a Windows 8.1 test machine):
Some pages are even worse:
When I remove AllowsTransparency from the main window, it looks like this on XP: (Note that the title bar has no problems any more)
We're really stuck and have no clues about its cause. Any help would be appreciated.
It seems this problem is related to the graphic card. In another VM with a different graphics accelerator we didn't face any major problems. In the problematic test machine, we lowered hardware acceleration to the third level and the problem is gone.
Display Properties -> Settings -> Advanced -> Troubleshoot
Although there are still some small issues with some mouse over animations and we lost the benefits cursor accelerations bring to the table, it's acceptable for us since not much is expected from Windows XP.

3D Screensaver interfering with WPF application (Windows XP)

I have a fairly large application that uses WPF for its user interface. I recently found an unusual defect regarding 3D screensavers. The 3D screensavers 3D FlowerBox,3D Flying Objects,3D Pipes,3D Text causes 1 of my WPF windows to disappear when the screensaver activates. Other screensavers are fine.
My application only encounters this problem on Windows XP.
I have some experience with DirectX. When a 3D screensavers activates, the d3d device context will be switched to exclusive mode. I reckon that WPF has trouble restoring the device context when the device switches back to cooperative mode (hence why its only affecting windows XP)
Has anyone seen such a scenario occur before ? Is there a remedy for the problem ?
Windows XP SP3, DirectX 9.0c, .NET 3.5
Not that exact one, but I have definitely seen strange problems with WPF and Windows XP, especially. The easy thing to say would be that you should try to move to Windows 7 ASAP, but then I would just be a jerk.
First off, check your video device driver. We've had a lot of problems with WPF on XP when an old graphics cards' device drivers are used. Update it to the latest version. That could take care of it.
If that doesn't work, and if you can, try swapping the video card for a different brand. That, too may work (though highly undesirable).
Third -- is your window semi-transparent or non-rectangular? If you switch your WPF app to be a regular, rectangular, boring, ugly Windows XP window, we've found that a lot of these quirks went away when we stopped getting fancy with our main windows. My guess is that it has something to do with the fact that XP has no desktop window manager. But then again I don't really know.
I know this is all very unsatisfying. We've had stuff like this happen to us on XP. I'm praying for our IT department to be able to move us to 7 this year...

wpf app invisible remotely (via radmin)

I've built a little WPF utility that watches a serialport and visualises monitoring information with WPF. It works fine, but a colleague just tried using it from another machine via radmin and my app is completely invisible! if you're at the machine you see it, if you view it via radmin you see the same screen but no app. Instead you see the app behind it (in this case windows explorer), but can't click on anything in the space where my app is.
Has anyone else come across this before??
It sounds like you need to upgrade to .NET 3.5 SP1.
On .Net Framework 3.5 SP1
We now remote as bitmaps in ALL cases.
The reason is that WPF 3.5 SP1 now
uses a new graphics DLL (wpfgfx.dll)
and certain changes could not be made
to Vista’s existing graphics DLL
(milcore.dll) that is also used by
DWM. Although this could be seen a
regression at first, depending on the
complexity of the application scene
(e.g. very rich scenes) this can
actually improve performance in
certain scenarios . Also, connections
with reasonably high bandwidth and
scenarios that don’t involve a lot of
animation or 3D, for instance, tend to
remote just fine via bitmaps.
Source
Checked the framework and it was already 3.5 SP1.
It's ok via RDP, so my colleague is happy. It just seems to be radmin, which I'd never used before and don't see the need for.

Vector Graphics on Windows Mobile

I have to make an application that runs on both Windows (XP/Vista) and Windows Mobile. The graphics interface must be scalable (for different resolutions) and the controls must be custom (like the ones usually found on music apps).
SVG was my instant choice but the lack of support on Windows Mobile pretty much kill my time budget. I've tried to evaluate WMF and it seems the right answer but i don't really like it.
I was thinking about WPF/XAML but i don't know what are the differences between Windows and Windows Mobile.
The project must be in C# or C++ and it's a commercial project (thus no GPLed libraries).
What would be the best choice? What ma I overlooking?
WinForms has limited support for scaling:
http://sellsbrothers.com/writing/winformsAutoScaling.htm
You may also want to look at "anchor" and "docking":
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-6165908.html
Combined together you should be able to create a UI that works for both desktop and mobile.
You can do scaling UI in .NET compact framework, like Erwin said with docking and achoring. In the windows mobile applications i have written i do normaly have to write some custom code that deals with things like Font scaling ( Touch founds might need bigger Font then system default if the text should be clickable).
I dont think your going to get it to scale picture correctly without code, i found some question releated that on this site. In my experience i write 99.9% of my code so it runs fine on both windows and windows mobile, but i do make a different UI for windows mobile.
If normaly write code in .NET 2.0 / .NET 2.0 Compact Framework, but if your you dont care about having to install .NET 3 then it should be better ( .NET 2 is wider spread out then .NET 3 )
Another option is the Qt library which is written in C++. It is LGPL which means that it can be used in commercial products without having to release your sources (except for changes to the library itself). If for some reason that isn't good enough they also sell commercial licenses.
It runs on Windows and Windows Mobile. As a bonus if you do a reasonable job of programming (and assuming everything else you're doing coding wise supports it) your application can also be run on Mac OSX, Linux and S60.
It has support for Scalable Vector Graphics, a Canvas with full widget support and a bunch of other nifty features as well! I'd suggest checking out the documentation and seeing if it has everything you need.
Silverlight?

Categories