Why WPF renders differently on different versions of Windows?

I read that WPF uses DirectX under the hood to perform its rendering, that it doesn't rely on the dinosaurian libraries that WinForms uses to render controls.

So I made my Presentation layer with WPF and it looks the way it should under Win8.

Then I deployed the project to Windows Server 2003... to find out that my nice little custom message box looks awfully WinForms-like and somewhat clunky; the button controls are VERY similar to the WinForms ones, the expander control is no longer shown as a circled ^ arrow and looks like it was drawn in 1998 (picture the ^ arrow on an ugly square flat button that pops up when your mouse hovers over it).

From the Pro WPF in C# 2010 Bible:

Part of the promise of WPF is that you don't need to worry about the details and idiosyncrasies of specific hardware. WPF is intelligent enough to use hardware optimizations where possible, but it has a software fallback for everything. So if you run a WPF application on a computer with a legacy video card, the interface will still appear the way you designed it.

So, is this a lie? To me it is, because it doesn't appear the way I designed it.

If not, then why/how doesn't the thing render identically regardless of the machine that's running it? Is the software fallback somehow designed to mimick Win32/GDI rendering? Is there a way to get my little custom message box to look identical on Win8 and WinServer2K3?

Answers


That has NOTHING to do with DirectX / Rendering / video card / any of that.

and EVERYTHING to do with WPF taking the DEFAULT appearance of ALL UI Elements from the Windows Theme.

If you don't want this behavior, you'll have to provide Styles and Templates for ALL UI element types, or otherwise find a way to include PresentationFramework.Aero.dll in your application and use that as the default theme library.

Take a look at this answer


Need Your Help

Best way to create an NSArray of NSNumbers from int **

nsarray nsnumber

I am using a library that returns a a series of ints using a parameter that looks like:

Codeigniter HMVC -> Call custom validators from MY_Form_validation.php file

php codeigniter validation codeigniter-hmvc

How to create custom form validators in MY_Form_validation.php file in HMVC and run them in any module/controller in HMVC structure for validation purpose.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.