Microsoft KB Archive/937106

= Performance is poor in a WPF-based application in which you have enabled layered windows in Windows XP or in Windows Server 2003 =

Article ID: 937106

Article Last Modified on 10/11/2007

-

APPLIES TO

 Microsoft Windows Server 2003 Service Pack 2, when used with:  Microsoft Windows Server 2003, Standard Edition (32-bit x86)

 Microsoft Windows Server 2003, Enterprise Edition

 Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)

 Microsoft Windows Server 2003, Standard x64 Edition</li></ul>

 Microsoft Windows Server 2003, Enterprise x64 Edition</li></ul>

 Microsoft Windows Server 2003, Datacenter x64 Edition</li></ul> </li> Microsoft Windows Server 2003 SP1, when used with:  Microsoft Windows Server 2003, Standard Edition (32-bit x86)</li></ul>

 Microsoft Windows Server 2003, Enterprise Edition</li></ul>

 Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)</li></ul> </li> Microsoft Windows Server 2003, Standard x64 Edition</li> Microsoft Windows Server 2003, Enterprise x64 Edition</li> Microsoft Windows Server 2003, Datacenter x64 Edition</li> Microsoft Windows XP Service Pack 2, when used with:  <li>Microsoft Windows XP Home Edition</li></ul>

<ul> <li>Microsoft Windows XP Professional</li></ul>

<ul> <li>Microsoft Windows XP Media Center Edition 2002</li></ul> </li></ul>

-

<div class="symptoms_section">

SYMPTOMS
A computer has the Microsoft .NET Framework 3.0 installed. In an application that is based on the Windows Presentation Foundation (WPF), you enable layered windows by setting the value of the Windows.AllowsTransparency windows property to TRUE. In this configuration, the performance of the WPF-based application is poor. Additionally, you may notice the following problems:
 * Jittery animation
 * Lower frame rate
 * High CPU usage

<div class="cause_section">

CAUSE
This problem occurs because layered windows enable the transparency effects of the top-level window. WPF-based applications render graphics by using the DirectX pipeline. In DirectX 9.0c, the IDirect3DSurface9::GetDC method does not support transparency effects that use an alpha channel. Therefore, graphics that a WPF-based application renders are not hardware-accelerated. Instead, the application renders graphics at the software level. In this situation, the application performs poorly and uses a high proportion of CPU time.

Note DirectX 9.0c is included with Microsoft Windows XP with Service Pack 2, with Microsoft Windows Server 2003 with Service Pack 1, and with Windows Server 2003 with Service Pack 2.

<div class="resolution_section">

Windows XP
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Prerequisites
No prerequisites are required.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Windows Server 2003
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Prerequisites
To apply this hotfix, you must have Windows Server 2003 Service Pack 1 or Windows Server 2003 Service Pack 2 installed.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Windows Server 2003, x86-based versions

Windows Server 2003, x64-based versions

<div class="workaround_section">

WORKAROUND
To work around this problem, disable layered windows in WPF-based applications.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
Apply this hotfix only to computers on which WPF-based applications do not use hardware acceleration to render graphics.

If you set the color quality to Medium (16 bit) in the Display Properties dialog box, the performance of certain video drivers may decrease in layered windows. To avoid this problem, set the color quality to Highest (32 bit).

Additional query words: HW Acceleration AllowsTransparency GetDC

Keywords: kbfix kbqfe kbwinxppresp3fix kbexpertiseinter kbhotfixserver kbwinserv2003postsp2fix KB937106

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.