﻿<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>WPF Team Blog</title>
    <atom:link
      href="https://review.docs.microsoft.com/archive/blogs/wpf/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://review.docs.microsoft.com/archive/blogs/wpf/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 23 Dec 2015 03:44:25 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>WPF in .NET 4.6.1</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/wpf-in-net-4-6-1</link>
      <pubDate>Thu, 29 Oct 2015 13:00:00 GMT</pubDate>
      <dc:creator><![CDATA[The WPF Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2015/10/29/wpf-in-net-4-6-1/</guid>
      <description><![CDATA[In addition to the platform and tooling improvements that we delivered in .NET 4.6,, we started...]]></description>
      <content:encoded><![CDATA[<p>In addition to the platform and tooling improvements that we delivered in .<a href="http://blogs.msdn.com/b/dotnet/archive/2015/07/20/announcing-net-framework-4-6.aspx" target="_BLANK">NET 4.6,</a>, we started looking into WPF App Local as a means of delivering platform improvements in March of this year. We had some early successes in our prototypes that we were super excited about, and we shared that with the community during <a href="https://channel9.msdn.com/Events/dotnetConf/2015/WPF-in-46-and-beyond" target="_BLANK">dotNetLive</a> and the <a href="https://channel9.msdn.com/Events/Visual-Studio/Connect-Live/Visual-Studio-WPF-Team-What-we-are-up-to" target="_BLANK">Connect</a> session.</p>
<p>Coming into this investigation, we knew we would have some hard challenges to overcome like ClickOnce performance. As we looked harder at these problems, we realized that the complexity that they were introducing would add a notable burden onto customers (E.g NGEN app local packages). In the light of these findings, we decided that the better solution was to work to improve system-wide WPF instead. At the same time, we want to bring some of the benefits of the app local approach, like quick turnaround of fixes and the ability for customers to privately test these changes into the system-wide version of the framework as well.</p>
<p>First, we want to assure you that we are still committed to continuously servicing the platform, providing important fixes and improvements, and evolving the tooling based on customer feedback. We are exploring ways for partners and the community to provide us with more direct feedback, and participate more easily in testing and validation of fixes and features as they are prepared. This would allow customers to review these changes in a non-production environment for feedback purposes. The following are the improvements that have been delivered as a part of .NET 4.6.1 release.</p>
<h3>Performance Improvements</h3>
<p>Touch stack performance has been improved with coalescing support added to touch events such that current position is reported after a UI thread delay similar to mouse pointer movements. &nbsp;Additionally, RichTextBox typing no longer hogs up the Render thread during fast input and you will be able to notice a much smoother experience in this scenario.</p>
<h3>DX Integration [Open Source]</h3>
<p>One of the highest voted <a href="http://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/4083793-native-directx-11-support-for-wpf">ideas</a> on our UserVoice was to add to WPF the ability to work with DX11 Content in D3DImage easily. We have been able to deliver on that through our WPF DirectX Extensions project hosted <a href="https://github.com/Microsoft/WPFDXInterop">here</a> in GitHub. Granted, this still requires a native dll for you author your DirectX visualizations but it enables you to easily integrate it with our custom D3DImage class in the project.</p>
<p>Currently, we have support for Dx10 and Dx11 and in future will extend it to DX11 on 12 and DX 12. If you are curious about what optimizations DX12 gives you, take a look at the article <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn899121(v=vs.85).aspx">here</a>. The nuget package <a href="http://go.microsoft.com/fwlink/?LinkID=691342">release </a>is a preview release at this time and we would love to get more feedback from the community on the quality and features before we release a stable version.</p>
<h3>WPF Samples [Open Source]</h3>
<p>There are a large number of <a href="https://msdn.microsoft.com/en-us/library/vstudio/ms771633(v=vs.90).aspx">samples</a> available for WPF in MSDN. Unfortunately, there are not easily browsable, targets .NET 3.5 and requires you to individually download each sample to take a look at the content. We have vastly simplified this process by hosting all the samples on GitHub. This is a work in progress and we have moved over 200+ samples (retargeted to 4.5.2) to the repo already. If you see a sample missing from the list, do let us know by raising an issue <a href="https://github.com/Microsoft/WPF-Samples/issues">here</a>.</p>
<h3>Spell Checking Improvements</h3>
<p>The spell checker in WPF has been updated on Windows 8.1 and above to leverage OS support for spell checking additional languages.&nbsp; There is no change in functionality on Vista SP2, Windows 7 and Windows 8. The following languages are available to be spell-checked, which includes the languages available for spelling checking in previous versions of .NET Framework (English, German, French, and Spanish).</p>
<table style="width: 618px;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p><strong>Culture</strong></p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p><strong>IETF Language Tag</strong></p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p><strong>Windows 8.1</strong></p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p><strong>Windows 10</strong></p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p><strong>LCID (Decimal)</strong></p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Arabic_SaudiArabia</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ar-SA</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1025</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Bulgarian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>bg-BG</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1026</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Catalan_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ca-ES</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1027</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Czech_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>cs-CZ</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1029</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Danish_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>da-DK</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1030</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>German_German</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>de-DE</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1031</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Greek_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>el-GR</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1032</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>English_US</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>en-US</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1033</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Finnish_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>fi-FI</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1035</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>French_French</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>fr-FR</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1036</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Hebrew_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>he-IL</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1037</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Italian_Italian</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>it-IT</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1040</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Dutch_Dutch</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>nl-NL</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1043</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Norwegian_Bokmal</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>nb-NO</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1044</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Polish_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>pl-PL</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1045</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Portuguese_Brazil</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>pt-BR</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1046</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Romanian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ro-RO</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1048</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Russian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ru-RU</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1049</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Croatian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>hr-HR</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1050</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Slovak_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>sk-SK</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1051</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Swedish_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>sv-SE</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1053</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Turkish_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>tr-TR</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1055</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Indonesian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>id-ID</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1057</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Ukrainian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>uk-UA</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1058</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Slovenian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>sl-SI</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1060</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Latvian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>lv-LV</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1062</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Lithuanian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>lt-LT</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1063</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Hindi_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>hi-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1081</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Portuguese_Portugal</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>pt-PT</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>2070</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Spanish_Modern</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>es-ES</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>3082</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Hungarian_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>hu-HU</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1038</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Urdu_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ur-PK</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1056</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Vietnamese_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>vi-VN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1066</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Malay_Malaysia</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ms-MY</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1086</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Punjabi_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>pa-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1094</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Gujarati_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>gu-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1095</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Tamil_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ta-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1097</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Telugu_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>te-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1098</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Kannada_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>kn-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1099</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Malayalam_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>ml-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1100</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Marathi_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>mr-IN</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>1102</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>English_UK</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>en-GB</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>2057</p>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" width="149">
<p>Bengali_Default</p>
</td>
<td valign="top" nowrap="nowrap" width="136">
<p>bn-BD</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>No</p>
</td>
<td valign="top" nowrap="nowrap" width="97">
<p>Yes</p>
</td>
<td valign="top" nowrap="nowrap" width="138">
<p>2117</p>
</td>
</tr>
</tbody>
</table>
<p>The above list is subject to changes, and is included here for informational purposes only &ndash; this list should not be treated as a guarantee for support of spell-checking on these languages. The list of spell-checkers supported by the underlying OS platform can vary over time &ndash; additional languages could be added, and existing languages might go out of support &ndash; and WPF&rsquo;s capabilities would correspondingly change as well.</p>
<p>As in the previous versions of .NET, the language for a TextBox control or a RichTextBox block is detected by looking at the following information in the order listed below:</p>
<ol>
<li>xml:lang is used, if specified.</li>
<li>Current input language</li>
<li>Current thread culture</li>
</ol>
<h3>Additional support for per-user custom dictionaries</h3>
<p>With the 4.6.1 RC we have added support for WPF to recognize custom dictionaries registered globally. This capability is available in addition to the ability to register them per-control. Also, custom dictionaries in the previous versions of WPF had no affordance for Excluded Words and AutoCorrect lists. On Windows 8.1 and Windows 10, these scenarios are now enabled through the use of files that can be placed under %AppData%\Microsoft\Spelling\<em>&lt;language tag&gt;</em>.</p>
<ul>
<li>The files should have extensions: <strong>.dic</strong> (Added words), <strong>.exc</strong> (Excluded words) or <strong>.acl</strong> (AutoCorrect).</li>
<li>The files should be UTF-16 LE plaintext that starts with the appropriate Byte Order Mark (BOM).</li>
<li>Each line should consist of a word (in the Added and Excluded word lists), or an autocorrect pair with the words separated by a vertical bar (&ldquo;|&rdquo;) (in the AutoCorrect word list).</li>
<li>These files are considered read-only and are not modified by the system.</li>
<li><strong>Note</strong>: These new file-formats are not directly supported by the WPF spell checking API&rsquo;s, and the custom dictionaries supplied to WPF in applications should <a href="https://msdn.microsoft.com/en-us/library/ee474799(v=vs.110).aspx">continue to use .lex files.</a></li>
</ul>
<p>Also, see <a href="https://support.microsoft.com/kb/3088234">KB3088234</a> for important additional details.</p>
<h3>Per-Monitor DPI Support</h3>
<p>Today, WPF applications are <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx">system-DPI aware</a> &ndash; this means that the applications are scaled by the OS to appropriately depending on the DPI of the monitor on which the application is being rendered. This can result in loss of sharpness, blurry text etc. Application developers have to write <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ee308410(v=vs.85).aspx">additional native code</a> to enable per-monitor DPI awareness in WPF applications.</p>
<p>Given the recent proliferation of high-DPI and hybrid-DPI environments in the ecosystem, &nbsp;we&rsquo;re working on a way to enable, out of the box, <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx">per-monitor DPI awareness</a> in WPF applications. If you are interested in trying out a preview version of this support, please complete the following <a href="http://www.instant.ly/s/KkT4x">survey</a> (available until November 6<sup>th</sup>). We will be reaching out in the next couple of weeks to those who have signed up and provide invites for downloading the installers from Connect.</p>
<p>Additionally, we are continuing to execute on our previously communicated investment areas and are actively listening to customer feedback. Please send us your feedback through replies to this post,&nbsp;<a href="mailto:wpfteam@microsoft.com">email</a>,&nbsp;<a href="http://connect.microsoft.com/VisualStudio">Connect</a>&nbsp;bugs and&nbsp;<a href="https://visualstudio.uservoice.com/forums/121579-visual-studio/category/89380-windows-presentation-foundation">User Voice</a>&nbsp;requests.</p>
<table style="width: 691px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="166">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/12/34/metablogapi/5584.clip_image006_7CA8C93B.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-12-34-metablogapi/5584.clip_5F00_image006_5F00_7CA8C93B.png"><img style="max-width: 550px;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/12/34/metablogapi/5584.clip_image006_7CA8C93B.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-12-34-metablogapi/5584.clip_5F00_image006_5F00_7CA8C93B.png" alt="" border="0" /></a></td>
<td valign="top" width="523">
<p><strong>Author: Harikrishna Menon</strong>, Senior Program manager, Visual Studio Client Tools Team</p>
<p>Hari is a Program Manager with Microsoft, and works on the Xaml Experiences Team in Visual Studio. He has been with Microsoft for over 6 years, and has shipped multiple versions of Visual Studio working on a variety of XAML tooling experiences spanning different XAML platforms like WPF, Windows Phone and Windows Store.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>WPF Community Projects</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/wpf-community-projects</link>
      <pubDate>Thu, 29 Oct 2015 10:39:00 GMT</pubDate>
      <dc:creator><![CDATA[The WPF Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2015/10/29/wpf-community-projects/</guid>
      <description><![CDATA[WPF Community Projects
If you do a quick search with WPF as the search query of GitHub, you get...]]></description>
      <content:encoded><![CDATA[<h1>WPF Community Projects</h1>
<p>If you do a quick search with WPF as the search query of GitHub, you get over 6K <a title="results" href="https://github.com/search?utf8=%E2%9C%93&amp;q=wpf">results</a>. That shows the incredible community support WPF has been blessed with over the years. We wanted to take this opportunity to call out some of popular and upcoming open source projects from the community, to give them the due recognition they deserve. This by no means an exhaustive list, but features projects and authors that our team has been in touch with over time and they have consistently given us a lot of great feedback over the years. If you feel a particular project has been overlooked, do let us know in the comments and we will look into featuring it in a future update to the blog.</p>
<h1>Material Design in XAML Toolkit</h1>
<p>Created by <a href="https://twitter.com/James_Willock">James Willock</a>, this is an awesome example of the community adapting non-Windows design concepts to fun useful themes for the platform. It already has 8k <a href="https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.nuget.org%2fpackages%2fMaterialDesignThemes%2f&amp;data=01%7c01%7charikm%40microsoft.com%7c15856655c1f64b0ef12808d2daa6ae2c%7c72f988bf86f141af91ab2d7cd011db47%7c1&amp;sdata=Atkf72FkcD6dkpAa1Qpn1kmLE14ZitOLaY0DBnMcYi0%3d">downloads</a>, and did I mention? It works amazingly well with <a href="https://github.com/ButchersBoy/Dragablz">Dragablz</a> and <a href="https://github.com/MahApps">Mahapps</a> (check the sample app in the repo). Excited, want to try it out? Check out the Get Started guide <a href="http://materialdesigninxaml.net/#getStarted">here</a>.</p>
<p><strong>[WPF Team]:</strong> What inspired you to build this?</p>
<p><strong>[James]:</strong> As an enterprise developer with a love of UI I feel that desktop apps often fall behind mobile and web in the looks department, but XAML has all the tools you need to build great UIs so I gave Material Design a shot.&nbsp; As soon as the first few templates were in place I knew the results were pretty good, and the early response from the community was encouraging so I pushed on to make a comprehensive library.&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/0456.sdsdsd.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/0456.sdsdsd.png"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/0456.sdsdsd.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/0456.sdsdsd.png" alt="" border="0" /></a></p>
<h1>Mahapps.metro</h1>
<p>With over 300K <a href="https://www.nuget.org/packages/MahApps.Metro/1.1.2">downloads</a>, this is super popular toolkit for creating metro-style WPF applications. Lots of goodness out-of-the box. Created by Paul Jenkins; Jake Ginnivan; Brendan Forster (shiftkey); Alex Mitchell (Amrykid); Dennis Daume (flagbug); Jan Karger (punker76) this enables WPF developers to add a metro flair to their app with very little effort. For more information, see <a href="http://mahapps.com/">here</a>. If you are interested in contributing to the project, head to the GitHub <a href="https://github.com/MahApps/MahApps.Metro">repo</a>. Some apps that are using this:-<a href="http://getespera.com/">Espera</a>,&nbsp;<a href="https://github.com/punker76/simple-music-player">Simple Music Player</a>&nbsp;,&nbsp;<a href="http://myechoapp.com/">myEcho</a>,&nbsp;<a href="https://github.com/jaben/papercut">Papercut</a>,&nbsp;<a href="http://code52.org/carnac/">Carnac</a>,&nbsp;<a href="http://mike-ward.net/markdownedit/">Markdown Edit</a>,&nbsp;<a href="https://github.com/chocolatey/ChocolateyGUI">ChocolateyGUI.</a>&nbsp;<strong></strong></p>
<p><strong>[WPF Team]:</strong> What inspired you to contribute to this?</p>
<p><strong>[Jan]:</strong> MahApps.Metro is a project that Paul Jenkins started back in 2011 as a simple way to bring a Metro-style user interface into your WPF application. I started in 2012 with my first PR to fix an issue for MahApps. After some more PRs I was added to the core team. MahApps is not only for metro-styled apps it's also possible to use it with 3rd party styling libs such <a href="https://github.com/ButchersBoy/MaterialDesignInXamlToolkit">Material Design in XAML &amp; WPF, for C# &amp; VB.Net</a>.&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/2185.sdsdsdsdsds.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/2185.sdsdsdsdsds.png"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/2185.sdsdsdsdsds.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/2185.sdsdsdsdsds.png" alt="" border="0" /></a></p>
<h1>Universal WPF</h1>
<p style="text-align: left;" align="center">Simply put, it is a<a href="https://github.com/dotMorten/UniversalWPF"> set of WPF Controls</a> ported from Windows Universal control concepts (RelativePanel, SplitView etc..). Created by <a href="https://twitter.com/dotMorten">Morten Nielsen</a> this is a work in progress and he is looking for community support to build this out and make it awesome. This super exciting work and we hope the community is contributing and make it a great addition to the WPF ecosystem. Give it a try at the repo <a href="https://github.com/dotMorten/UniversalWPF">here</a>.</p>
<p><strong>[WPF Team]: </strong>What inspired you build this?</p>
<p><strong>[Morten]</strong>: I love building controls - it's probably my favorite part of developing. I also love the new RelativePanel control in Universal app -&nbsp;it allows you to create some nicely aligned set of controls and at the same time significantly reducing the size of your UI tree to achieve that layout. But it was missing from WPF which could get a lot of benefit from reducing the number of UI elements required in many some advanced layouts. At the same time, Custom Panel controls are quite challenging and a great way to really understand the layout system of XAML - the Measure and&nbsp;Arrange steps in particular, and the complexity of the RelativePanel simply sounded like a fun challenge. After publishing it requires for more controls came, so I'm currently working on the SplitView. Also the new Adaptive Triggers really makes SplitView and Relative Panel 'tick', so this is also something I'm working on adding as a future enhancement. So the bottom line as to why: Just some plain ol' fun :-)</p>
<p style="text-align: center;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/5001.qwqwq.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/5001.qwqwq.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/5001.qwqwq.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/5001.qwqwq.png" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Blend for Visual Studio 2015 RC</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/blend-for-visual-studio-2015-rc</link>
      <pubDate>Wed, 29 Apr 2015 14:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Harikrishna Menon]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2015/04/29/blend-for-visual-studio-2015-rc/</guid>
      <description><![CDATA[Today we are pleased to announce the availability of an improved Blend experience&nbsp;when...]]></description>
      <content:encoded><![CDATA[<p style="color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px;"><span style="color: black; font-family: 'Arial',sans-serif; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">Today we are pleased to announce the availability of an improved Blend experience&nbsp;when you&nbsp;<span style="color: #1f497d; font-family: 'Arial',sans-serif; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><a href="https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs">download Visual Studio 2015 RC</a></span></span>. We redesigned Blend for Visual Studio 2015 to provide you with a great user interface development experience for creating beautiful XAML apps. Blend has a sleek new look consistent with Visual Studio for improved workflow between the two products. In addition, improved XAML IntelliSense and UI tools for XAML debugging are now available in Blend!</p>
<p style="color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px;">Some highlights of this new release include:</p>
<p style="color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px;"><strong>User interface tailored for XAML design:</strong> Blend&rsquo;s new user interface makes it easier to design your XAML apps by giving more space to the panes you use the most, including the properties and objects and timeline panes. In doing so, Blend provides you with a more pleasant and productive XAML design experience.</p>
<p style="color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/BlendPostWPF/0317.blend_dark_wpf_rc.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-BlendPostWPF/0317.blend_5F00_dark_5F00_wpf_5F00_rc.png"><img style="margin-right: auto; margin-left: auto; vertical-align: middle; display: block;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/BlendPostWPF/0317.blend_dark_wpf_rc.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-BlendPostWPF/0317.blend_5F00_dark_5F00_wpf_5F00_rc.png" alt="" width="650" height="367" /></a></p>
<p><strong>Roslyn powered XAML IntelliSense:</strong> We created a new XAML language service to provide you with faster and better XAML IntelliSense. The new XAML language service is provided in both VS and Blend.</p>
<p><strong>UI tools for XAML debugging: </strong>Blend now includes tools for inspecting XAML at runtime. These tools enable you to inspect the visual tree of your running app and the properties of any element in the tree to make it easier to debug your XAML. To learn more about this feature, please read Dante&rsquo;s <a href="http://blogs.msdn.com/b/visualstudio/archive/2015/02/24/introducing-the-ui-debugging-tools-for-xaml.aspx">Introducing the UI debugging tools for XAML</a> post.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/BlendPostWPF/1680.lvt.PNG" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-BlendPostWPF/1680.lvt.PNG"><img style="margin-right: auto; margin-left: auto; display: block; max-width: 550px;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/BlendPostWPF/1680.lvt.PNG" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-BlendPostWPF/1680.lvt.PNG" alt="" border="0" /></a></p>
<p><strong>Design in Blend / Edit in VS:</strong> To continue supporting the simultaneous XAML design and code editing experience between Blend and VS, they now include the &ldquo;Design in Blend&rdquo; and &ldquo;Edit in Visual Studio&rdquo; commands available through context menus in the solution explorer pane.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/3223.edit_cmd.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/3223.edit_5F00_cmd.png"><img style="margin-right: auto; margin-left: auto; display: block;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/3223.edit_cmd.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/3223.edit_5F00_cmd.png" alt="" border="0" /></a></p>
<p><strong>Accessibility: </strong>As part of Microsoft&rsquo;s ongoing effort towards creating accessible software, the Blend designer panes are now fully keyboard and screen reader accessible. Whether you use accessible technologies or are a power user who likes to use the keyboard to accomplish tasks faster, please try these new features and tell us what you think. Furthermore, we are actively working towards also making Blend high-contrast accessible.</p>
<p>Try the new Blend for Visual Studio 2015 today by installing <a href="https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs">Visual Studio 2015 RC</a>. A number of improvements are motivated by your feedback. Thank you for sharing these suggestions with us! We are looking forward to hearing from you on how we can continue to improve Blend for Visual Studio. As always, please post your suggestions on <a href="http://visualstudio.uservoice.com">UserVoice</a>, and report any bugs you find on our <a href="http://connect.microsoft.com/VisualStudio">Connect</a> site.</p>
<table style="width: 870px; height: 196px;">
<tbody>
<tr>
<td><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/BlendPostWPF/4111.Kino.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-BlendPostWPF/4111.Kino.png"><img style="max-width: 550px;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/BlendPostWPF/4111.Kino.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-BlendPostWPF/4111.Kino.png" alt="" border="0" /></a></td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<td>
<p><strong>Kino Aguilar</strong>,<br />Program Manager, Visual Studio Client Tools Team</p>
<p>Kino is a Program Manager in the XAML Experiences Team. He<br />joined Microsoft in 2013, and since then has helped ship tools for creating<br />XAML apps. He is the PM owner of Blend for Visual Studio 2015.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Expanding WPF for UI Debugging</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/expanding-wpf-for-ui-debugging</link>
      <pubDate>Tue, 24 Feb 2015 08:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Harikrishna Menon]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2015/02/24/expanding-wpf-for-ui-debugging/</guid>
      <description><![CDATA[The Optimum User Experience
Since the very earliest days of WPF/XAML development, there has always...]]></description>
      <content:encoded><![CDATA[<h3><span style="color: #000000; font-family: Calibri Light;">The Optimum User Experience</span></h3>
<p><span style="font-family: Calibri; font-size: small;">Since the very earliest days of WPF/XAML development, there has always been a need to inspect the visual tree. Early Pre-Alpha builds of Blend had a debug command which would dump the entire visual tree to a text file so developers could look through it for anomalies. We had internal tools for inspecting visual trees and the properties of those elements and debugging capabilities of this type have been a frequent ask for years.&nbsp; For Visual Studio 2015, we wanted to take a look at the needs that developers, both internal and external, faced and look at the tools we&rsquo;ve made to create the optimal runtime inspection tools that we could. Information on how to use the UI debugging tools&nbsp;can be found <a href="http://blogs.msdn.com/b/visualstudio/archive/2015/02/24/introducing-the-ui-debugging-tools-for-xaml.aspx">here</a>, but if you&rsquo;re interested in how we made it happen, please read on.</span></p>
<p><span style="font-family: Calibri; font-size: small;">After examining our internal solutions and the common issues we&rsquo;ve heard and put together the following list of items we wanted to do:</span></p>
<ul>
<li>
<p>The ability to inspect an existing installed app or an &lsquo;in-development&rsquo; app at debug time.</p>
</li>
<li>
<p>A representation of the visual tree that is always up to date.</p>
</li>
<li>
<p>The ability to select elements by selecting them in the running app.</p>
</li>
<li>
<p>The ability to locate and select any element in the representation of the visual tree.</p>
</li>
<li>
<p>A command to locate a given element in the source XAML.</p>
</li>
<li>
<p>A complete list of all properties on any selected element, displayed based on where the property is set (locally, in a Style, etc&hellip;).</p>
</li>
<li>
<p>The ability to change any property setter at any scope.</p>
</li>
<li>
<p>A command to jump to wherever a property setter is defined if it comes from XAML.</p>
</li>
<li>
<p>A persistence option to push runtime debugging changes into the XAML.</p>
</li>
</ul>
<p><span style="font-family: Calibri; font-size: small;">We created these requirements based on the needs of XAML developers, regardless of their platform or target device of choice. Naturally, the experience would tweak slightly based on these factors. </span><span style="font-family: Calibri; font-size: small;">The way a user selects an element for investigation on the desktop is going to be different from selection on a Windows Phone. </span></p>
<h3><span style="color: #000000; font-family: Calibri Light;">What do we need and what is missing?</span></h3>
<p><span style="font-family: Calibri; font-size: small;">The first system we need is one that allows us to talk to different apps on different platforms. We started by creating the XamlDiagnosticTap.dll, which is a generic solution that the debugger extension in Visual Studio knows how to communicate with. This assembly is loaded by one of a set of platform specific assemblies. For instance, in a WPF application, WPFXamlDiagnosticTap.dll is injected into the running app and it will pull in the generic XamlDiagnosticTap.dll. It&rsquo;s obvious that we&rsquo;ll see other flavors of the platform level tap, like Desktop</span><span style="font-family: Calibri; font-size: small;">XamlDiagnosticTap</span><span style="font-family: Calibri; font-size: small;">.dll or WPXamlDiagnosticTap.dll.</span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/8081.Untitled.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/8081.Untitled.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/8081.Untitled.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/8081.Untitled.png" alt="" border="0" /></a></p>
<p><span style="font-family: Calibri; font-size: small;">When we compared our requirement list to the capabilities of WPF, we found that we really only had two shortcomings. WPF didn&rsquo;t provide a system for listening to changes in the visual tree, and it only stored source information privately in BAML files. </span></p>
<h3><span style="color: #000000; font-family: Calibri Light;">The VisualTreeChanged event</span></h3>
<p><span style="font-family: Calibri; font-size: small;">It turns out that all Visual Tree manipulations channel through four or five specific methods. These methods had all the information that we wanted, including the handles to the elements being added or removed. Adding the events here was surprisingly simple. The final implementation fires the events whenever any element is added or removed from any other element. </span></p>
<p><span style="font-family: Calibri; font-size: small;">The API ends up looking like this:</span></p>
<div>
<p><span style="font-family: Consolas;">public enum VisualTreeChangeType { Add, Remove }</span></p>
<p><span style="font-family: Consolas;">public static event EventHandler&lt;VisualTreeChangeEventArgs&gt; System.Windows.Diagnostics.VisualDiagnostics.VisualTreeChanged </span></p>
<p><span style="font-family: Consolas;">public class VisualTreeChangeEventArgs : EventArgs</span></p>
<p><span style="font-family: Consolas;">{</span></p>
<p><span style="font-family: Consolas;">&nbsp; public DependencyObject Parent { get; }</span></p>
<p><span style="font-family: Consolas;">&nbsp; public DependencyObject Child { get; }</span></p>
<p><span style="font-family: Consolas;">&nbsp; public int ChildIndex { get; }</span></p>
<p><span style="font-family: Consolas;">&nbsp; public VisualTreeChangeType ChangeType { get; }</span></p>
<p><span style="font-family: Consolas;">}</span></p>
</div>
<p><span style="font-family: Calibri; font-size: small;">It should be noted that this API is designed as a <em>debugger</em> API. Specifically, when you attempt to register for notifications on the VisualTreeChanged event, the request to register is <span style="text-decoration: underline;">ignored</span> if the debugger is not currently attached. It&rsquo;s also worth mentioning that at the time of this writing, this API is still in development, and it&rsquo;s subject to change. </span></p>
<h3><span style="color: #000000; font-family: Calibri Light;">The GetXamlSourceInfo method</span></h3>
<p><span style="font-family: Calibri; font-size: small;">The source code information was a bit trickier. For elements originating from a BAML file, the elements already knew their source information. They knew the source XAML file that declared the elements as well as the Line/Column information to locate the declarations. Unfortunately, the information was private to the element and couldn&rsquo;t be extracted by the diagnostic tap. Then, unfortunately, elements originating from a XAML file didn&rsquo;t have their source information at all. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Exposing the already existing file information for BAML elements was easy, but we started some interesting discussions around the XAML elements. BAML is an optional step, and many people don&rsquo;t even use it. Additionally, while folks are still working on their app, it&rsquo;s uncommon for people to already be creating BAML files, so in our investigations, most people worked from XAML files until later in the development process. Now, consider what it means to add the source information. For every element, we need to add the file information along with the line/column information. While this isn&rsquo;t a large amount per element, when you add it all together, it&rsquo;s a sufficiently significant amount of memory that may obscure other memory issues. We eventually decided that the source information for XAML originating elements would only be available in Debug builds of the user&rsquo;s apps, and we&rsquo;d require a launch-time switch to enable it, even for Debug builds. </span></p>
<p><span style="font-family: Calibri; font-size: small;">For DependencyObject elements, it&rsquo;s trivial to add an additional attached DependencyProperty, and in that property, store the file, line and row information. However, non-DependencyObject elements, like Styles, don&rsquo;t afford us this luxury. For these, we used the handy ConditionalWeakTable object from the System.Runtime.CompilerServices namespace. Simply put, the ConditionalWeakTable is similar to a dictionary, but with the noted exception that it doesn&rsquo;t hold references to the objects inside it. This means that if we create a reference to Object A and all other references to A cease to exist, the ConditionalWeakTable deletes the reference to A. This prevents the ConditionalWeakTable from keeping objects alive once the system has released all other references to them. </span></p>
<p><span style="font-family: Calibri; font-size: small;">In effect, an element gets created, we store its source information in the ConditionalWeakTable. If the app deletes the element and abandons all of its references to it, the ConditionalWeakTable automatically removes the source information from itself and the object is ready for Garbage Collection. More information on the ConditionalWeakTable can be found on MSDN.</span></p>
<p><span style="font-family: Calibri; font-size: small;">The API for getting XamlSourceInfo is quite straightforward:</span></p>
<div>
<p><span style="font-family: Consolas;">&nbsp; public static XamlSourceInfo System.Windows.Diagnostics.VisualDiagnostics.GetXamlSourceInfo(object obj) </span></p>
<p><span style="font-family: Consolas;">&nbsp;&nbsp;public class XamlSourceInfo</span></p>
<p><span style="font-family: Consolas;">&nbsp; {</span></p>
<p><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; public Uri SourceUri { get; }</span></p>
<p><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; public int LineNumber;</span></p>
<p><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; public int LinePosition;</span></p>
<p><span style="font-family: Consolas;">&nbsp; }</span></p>
</div>
<p><span style="font-family: Calibri; font-size: small;">However, in order to use to use the method, two things need to be true first. As discussed above, the SourceInfo is only available for Debug builds of apps. Second, the environment variable ENABLE_XAML_DIAGNOSTICS_SOURCE_INFO will be checked when the app is started. If the variable is set and set to any value except 0 or false, WPF will store the source information for all elements. When launching your app from inside Visual Studio, the debugger extension will automatically set this in the process it will use to launch your app. However, if you&rsquo;re trying to get source information on another machine, you can manually set the environment variable before launching the Debug build of the app, and you will be able to attach and get source information.</span></p>
<p><span style="font-family: Calibri; font-size: small;">Additionally, like the VisualTreeChanged event, the GetXamlSourceInfo API is subject to change. MSDN will have the latest up to date information when the API is finalized.</span></p>
<h3><span style="color: #000000; font-family: Calibri Light;">Conclusion</span></h3>
<p><span style="font-family: Calibri; font-size: small;">The architecture for these tools had to be created in a platform agnostic way, in order to have a consistent experience across platforms. Then, we needed to create a platform dependent wrapper around our generic architecture to handle the various differences between the platforms. Finally, when we looked at the user experience we wanted to deliver, we had to choose between cutting back on the experience or extending the platform. When it came down to it, we simply weren&rsquo;t satisfied with the </span><span style="font-family: Calibri; font-size: small;">experience we&rsquo;d be delivering to our WPF developers without the platform extensions. The decision to deliver the top-notch experience that we wanted was an easy one to make.</span></p>
<table border="0">
<tbody>
<tr>
<td><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/7026.Untitled2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/7026.Untitled2.png"><img style="width: 132px; height: 135px;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/7026.Untitled2.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64/7026.Untitled2.png" alt="" width="549" height="645" border="0" /></a></span></span></td>
<td valign="top">
<p style="text-align: left;"><span style="font-size: small;"><span style="font-family: Calibri;">Dante Gagne is a Program Manager with 12 years of experience with XAML. He started as one of the original testers on Expression Blend and brings his passion to XAML developers in Visual Studio. His focus is on the design experience and productivity.</span></span></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>New UI Performance Analysis Tool for WPF Applications</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/new-ui-performance-analysis-tool-for-wpf-applications</link>
      <pubDate>Fri, 16 Jan 2015 06:00:00 GMT</pubDate>
      <dc:creator><![CDATA[The WPF Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2015/01/16/new-ui-performance-analysis-tool-for-wpf-applications/</guid>
      <description><![CDATA[In Visual Studio 2013, we added a new XAML UI Responsiveness tool in the performance and diagnostics...]]></description>
      <content:encoded><![CDATA[<p>In Visual Studio 2013, we added a new <a href="http://blogs.msdn.com/b/visualstudioalm/archive/2013/07/11/xaml-ui-responsiveness-tool-in-visual-studio-2013.aspx">XAML UI Responsiveness</a> tool in the <a href="http://blogs.msdn.com/b/visualstudioalm/archive/2013/07/12/performance-and-diagnostics-hub-in-visual-studio-2013.aspx">performance and diagnostics hub</a> to enable you to analyze application interaction-related performance issues in your XAML Windows Store applications. Since then, we&rsquo;ve gotten a number of <a href="http://blogs.msdn.com/b/visualstudioalm/archive/2013/07/11/xaml-ui-responsiveness-tool-in-visual-studio-2013.aspx">requests</a> to support WPF applications. We&rsquo;re excited to announce that we have built a new Application Timeline tool which is a replacement for the existing XAML UI Responsiveness tool that supports WPF applications in <a href="http://blogs.msdn.com/b/visualstudio/archive/2015/01/16/visual-studio-2015-cpt-5-now-available.aspx">Visual Studio 2015 CTP 5</a>. Current support is limited to WPF (.NET 4.0 and above) and Windows Store 8.1 applications running on Windows 8.1 or later. We are exploring adding support for Windows 7 in a future release of Visual Studio.</p>
<h1>Why use the new profiling tool?</h1>
<p>Performance is a critical aspect of any enterprise WPF application. Customers expect applications to load fast, as well as interactions with them to be jitter free and fluid. The Application Timeline tool helps you improve the performance of your WPF applications by providing a semantically-rich, scenario centric view of your applications&rsquo; resource consumption. You can analyze the time spent by your application preparing UI frames, servicing network and disk requests, and much more in scenarios like Application Startup and Page Load. This post briefly highlights the features of this tool.</p>
<h2>Profiling an application</h2>
<p>To profile a WPF application in Visual Studio 2015 CTP 5, open the Performance and Diagnostics hub from the Debug -&gt; <em>Start Diagnostic Tools Without Debugging</em> (ALT+F2) menu. Select the <em>Application</em>&nbsp;<em>Timeline</em> tool and click <em>Start </em>(You can also run the CPU Usage tool alongside the Application Timeline tool). This launches the application in the profiler. Once you exercise the scenario that you&rsquo;d like to investigate, you can stop the profiling session by clicking on the <em>Stop Collection</em> link, which starts the analysis of the collected performance data.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/6406.Start_3A8442BD.gif" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/6406.Start_5F00_3A8442BD.gif"><img style="float: none; margin-left: auto; display: block; margin-right: auto;" title="Start" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/4024.Start_thumb_56B71C4C.gif" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/4024.Start_5F00_thumb_5F00_56B71C4C.gif" alt="Start" width="640" height="455" /></a></p>
<p>Now you can investigate the performance report for optimization opportunities.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/5516.FinishProfiling_0B577888.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/5516.FinishProfiling_5F00_0B577888.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="FinishProfiling" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/8255.FinishProfiling_thumb_790EB1C5.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/8255.FinishProfiling_5F00_thumb_5F00_790EB1C5.png" alt="FinishProfiling" width="644" height="461" border="0" /></a></p>
<h2>Inspecting profiling session details</h2>
<p>The report shows a chronologically ordered list of interesting events in your application, which directly corresponds to CPU consumption during your application&rsquo;s execution.</p>
<h3>Graphs</h3>
<p>Along with the reports, you are also equipped with graphs that detail the <em>UI thread utilization</em> and the <em>Visual throughput</em> (UI and Composition) of your application. These graphs enable you to quickly spot periods of excessive UI thread utilization or low frame rate which might correspond to poor application responsiveness. The <em>UI Thread utilization </em>graph details the time spent by the UI thread in Parsing, Layout, Render, I/O, Application Code and other framework services. Currently, only Disk I/O is computed in I/O. Network I/O support is slated for a future release. The <em>Visual throughput </em>graph details the frame rate of both the UI thread in the application and the Composition thread in the Desktop Window Manager.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/7607.Grpahs_5BF757DC.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/7607.Grpahs_5F00_5BF757DC.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="Grpahs" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/8267.Grpahs_thumb_06CFBBEF.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/8267.Grpahs_5F00_thumb_5F00_06CFBBEF.png" alt="Grpahs" width="644" height="161" border="0" /></a></p>
<p>After identifying a region of interest, you can further drill down and filter to the events in the selected time range by click-and-dragging the selection on the graphs. You can achieve more fine grained control over the selected time range by using the left/right arrow keys on the ruler handles.</p>
<h4>Details View</h4>
<p>The <em>details view </em>is where you will be spending most of your time analyzing the report. It shows a detailed view of CPU utilization of your application categorized by the UI Framework subsystem or system component that <span>consumed</span> the CPU. Below is the list of categories and events supported in Visual Studio 2015 CTP 5 for WPF applications. We will continue to enhance this list in the future based on our investigations into real life performance issues and your feedback.</p>
<p><strong>XAML</strong>: Layout, Parsing, Render</p>
<p><strong>System</strong>: Disk, Network</p>
<p><strong>Other</strong>: Garbage Collection</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/4786.UI-Enhancements_2993845D.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/4786.UI_2D00_Enhancements_5F00_2993845D.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="UI Enhancements" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/0247.UI-Enhancements_thumb_3B70182A.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/0247.UI_2D00_Enhancements_5F00_thumb_5F00_3B70182A.png" alt="UI Enhancements" width="644" height="227" border="0" /></a></p>
<p>Most of the events occur on the UI thread and are marked as such by the purple bar on the left of the event in the details view. Some of these events have descriptors in their names that enable you to quickly inspect the key property of the event. E.g., the Layout event always shows the number of elements that have taken part in that layout pass. Other events like Disk and Network I/O have hint text that details the total data payload of these requests. This enables you to in many cases co-relate the time consumed by the event to the size of the payload serviced in that time range.</p>
<p>These UI enhancements can be turned off by using the <em>View Settings</em> option in the command bar of the details view.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/2045.ViewSettings_6245B64E.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/2045.ViewSettings_5F00_6245B64E.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="ViewSettings" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/6330.ViewSettings_thumb_16E6128A.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/6330.ViewSettings_5F00_thumb_5F00_16E6128A.png" alt="ViewSettings" width="404" height="183" border="0" /></a></p>
<p>We also support a variety of filtering options for your convenience that you can access from the <em>Filter</em> option in the command bar. These commands enable you to slice and dice the events in the details view to isolate specific events or regions of interest.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/4276.Filters_76CB05CC.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/4276.Filters_5F00_76CB05CC.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="Filters" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/2133.Filters_thumb_56AFF90F.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/2133.Filters_5F00_thumb_5F00_56AFF90F.png" alt="Filters" width="404" height="264" border="0" /></a></p>
<p>When you find an event of interest, you can drill into it further using the following gestures:</p>
<ul>
<li>Selecting the event row will display additional details about it in the detail pane. E.g., selecting a Parsing event will show the full path of the XAML file that was parsed.</li>
<li>Expanding the event row will display its child events. E.g., expanding a Parsing event will show all Parsing events that was generated as a result of the parent parsing event</li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/8231.EventSelection_5D8B6D88.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/8231.EventSelection_5F00_5D8B6D88.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="EventSelection" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/8244.EventSelection_thumb_16361796.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/8244.EventSelection_5F00_thumb_5F00_16361796.png" alt="EventSelection" width="704" height="266" border="0" /></a></p>
<p>By default, the timeline is sorted chronologically. If you want to quickly check out the most expensive events in your session, you can do so by changing the sort type to <em>Duration</em> from <em>Start time.</em></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/6740.SortedDuratio_088BA519.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/6740.SortedDuratio_5F00_088BA519.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="SortedDuratio" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/4214.SortedDuratio_thumb_7642DE56.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/4214.SortedDuratio_5F00_thumb_5F00_7642DE56.png" alt="SortedDuratio" width="644" height="419" border="0" /></a></p>
<p>Some of the key scenarios and optimizations that can be done based on their inspection are given below:</p>
<p><strong>Layout</strong>: In large applications, often thousands of elements are shown on the screen at the same time. This might result in a low UI frame rate and correspondingly poor application responsiveness. The <em>Layout</em> event accurately determines the cost of laying out each element (i.e. the time spent in Arrange, Measure, Apply Template, Arrange Override and Measure Override) and builds the visual trees that took part in a Layout pass. You can use this visualization to determine which of your logical trees needs pruning, or to evaluate other deferral mechanisms to optimize your layout pass. <strong></strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/2548.Layout_18C04E15.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/2548.Layout_5F00_18C04E15.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="Layout" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/6266.Layout_thumb_6D7BB70D.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/6266.Layout_5F00_thumb_5F00_6D7BB70D.png" alt="Layout" width="704" height="176" border="0" /></a></p>
<p><strong>Parsing: </strong>This event enables you to identify the total time spent by the UI thread in parsing XAML files and creating objects. It also shows you the dependency chain of all the XAML files that was parsed as a result of the root event. This will enable you to identify unnecessary file parsing and object creation in performance sensitive scenarios and optimize them out. <strong></strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/3531.Parsing_4D60AA50.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/3531.Parsing_5F00_4D60AA50.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="Parsing" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/4111.Parsing_thumb_060B545E.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/4111.Parsing_5F00_thumb_5F00_060B545E.png" alt="Parsing" width="704" height="162" border="0" /></a></p>
<p><strong>Disk and Network I/O: </strong>Frequent disk access and large network payloads on the UI thread might severely impact application responsiveness<strong>. </strong>Even if some of these I/O accesses happen on a different thread, it might still impact the perceived responsiveness of the application. These events will detail the total payload and time spent servicing the I/O requests. Currently only network requests serviced through the WININET provider is represented here. Support for other providers will be added in a future release.</p>
<p><strong>Application startup:</strong> One of the goals we had laid out while designing the profiler was to make it easy for our customers to quickly identify scenarios of interest in the vast trove of session data that is displayed in the tool. In order to do this, we automatically identify scenarios that we believe are of interest to you and generate semantic events for the same. Application Startup is a semantic event that is created by our tool that measures the interval between application launch by the operating system to the time taken for the application to submit the first frame to the Desktop Window Manager. This measurement in essence captures the startup time of your application. You can choose to filter the session details to this specific scenario by executing the filter to event command in the context menu.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/1057.AppStartup_65F047A0.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/1057.AppStartup_5F00_65F047A0.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="AppStartup" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/1070.AppStartup_thumb_73C28D9B.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/1070.AppStartup_5F00_thumb_5F00_73C28D9B.png" alt="AppStartup" width="644" height="450" border="0" /></a></p>
<p>This enables you to quickly identify the events that consume the largest blocks of time in this scenario. In the example above, you can see that <em>Layout</em> event consumes the largest block of time. Optimizing layout here will enable faster application startup.</p>
<p><strong>Frame:</strong> If you want to view the total time spent in UI frame creation, you can toggle the <em>Group by Frames </em>option in the command bar. This will group the <em>Layout</em> events and related <em>Render</em> events in a UI thread frame to a semantic Frame event.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/2072.Frames_2F82264F.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/2072.Frames_5F00_2F82264F.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="Frames" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/6114.Frames_thumb_5D034612.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/6114.Frames_5F00_thumb_5F00_5D034612.png" alt="Frames" width="704" height="129" border="0" /></a></p>
<p><strong>Application Code: </strong>The Application Timeline tool can be used in conjunction with the CPU Usage tool. This enables you to co-relate excessive App Code execution (observed on the UI Thread utilization graph) to user code that was executed during that time period.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/8741.Co-Op_27F6B6E2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/8741.Co_2D00_Op_5F00_27F6B6E2.png"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border-width: 0px;" title="Co-Op" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/7776.Co-Op_thumb_4EC4CD22.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/7776.Co_2D00_Op_5F00_thumb_5F00_4EC4CD22.png" alt="Co-Op" width="644" height="316" border="0" /></a></p>
<h3>Known limitations</h3>
<p>Currently only events from the UI thread of the Main Application Window are shown in the tool. We will be adding support for other UI threads in the application in a near future release of Visual Studio.<em></em></p>
<h3>Tell us more!</h3>
<p>We are interested in knowing more about what you think about our tooling investments in the WPF platform and what you would like to see in the Performance and Diagnostics hub going forward. Please send us your feedback through replies to this post, <a href="http://connect.microsoft.com/VisualStudio">Connect</a> bugs, <a href="http://visualstudio.uservoice.com/forums/121579-visual-studio/category/44115-xaml-tools">User Voice</a> requests, the <a href="http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsdebug">MSDN diagnostics forum</a> or the <a href="http://msdn.microsoft.com/en-us/library/zzszcehe.aspx">Send a Smile</a> button inside Visual Studio.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="166">
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/12/34/metablogapi/5584.clip_image006_7CA8C93B.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-12-34-metablogapi/5584.clip_5F00_image006_5F00_7CA8C93B.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" title="clip_image011" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/1423.clip_image011_1C60F9A3.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/1423.clip_5F00_image011_5F00_1C60F9A3.png" alt="clip_image011" width="143" height="184" border="0" /></a></p>
</td>
<td valign="top" width="523">
<p><strong>Author: Harikrishna Menon</strong>, Program manager, Visual Studio Client Tools Team</p>
<p>Hari is a Program Manager with Microsoft, and works on the Xaml Experiences Team in Visual Studio. He has been with Microsoft for over 6 years, and has shipped multiple versions of Visual Studio working on a variety of XAML platform and tooling experiences spanning different XAML platforms like WPF, Windows Phone and Windows Store.</p>
</td>
</tr>
</tbody>
</table>]]></content:encoded>
    </item>
    <item>
      <title>The Roadmap for WPF</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/the-roadmap-for-wpf</link>
      <pubDate>Wed, 12 Nov 2014 07:37:00 GMT</pubDate>
      <dc:creator><![CDATA[The WPF Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2014/11/12/the-roadmap-for-wpf/</guid>
      <description><![CDATA[Today, we announced the roadmap for the WPF platform. The post defines the areas of investment in...]]></description>
      <content:encoded><![CDATA[<p>Today, we announced the <a href="http://blogs.msdn.com/b/dotnet/archive/2014/11/12/the-roadmap-for-wpf.aspx">roadmap for the WPF platform</a>. The post defines the areas of investment in future releases of WPF, and details the current progress of improvements made to the WPF platform in the .NET Framework 4.6 and Visual Studio 2015.</p>
<p>We have made some key improvements to WPF in this release:</p>
<ul>
<li>Transparent child windows</li>
<li>Multi-image cursor files</li>
<li>Re-designed Blend experience</li>
<li>New set of Visual Diagnostics tools</li>
<li>Timeline tool in the Performance and Diagnostics hub</li>
</ul>
<p>We have also fixed a number of customer reported issues. The best place to ask us questions or engage with the us is in the comments of the <a href="http://blogs.msdn.com/b/dotnet/archive/2014/11/12/the-roadmap-for-wpf.aspx">roadmap for the WPF platform blog post</a>.</p>
<table style="width: 691px;" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top" width="166">
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/6431.clip_image006_thumb13_47F5BD96.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/6431.clip_5F00_image006_5F00_thumb13_5F00_47F5BD96.png"><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" title="clip_image006_thumb1[3]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/metablogapi/4377.clip_image006_thumb13_thumb_639A498C.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-64-metablogapi/4377.clip_5F00_image006_5F00_thumb13_5F00_thumb_5F00_639A498C.png" alt="clip_image006_thumb1[3]" width="139" height="180" border="0" hspace="12" /></a></p>
</td>
<td valign="top" width="523">
<p><strong>Author: Harikrishna Menon</strong>, Program manager, Visual Studio Client Tools Team</p>
<p>Hari is a Program Manager with Microsoft, and works on the Xaml Experiences Team in Visual Studio. He has been with Microsoft for over 6 years, and has shipped multiple versions of Visual Studio working on a variety of XAML tooling experiences spanning different XAML platforms like WPF, Windows Phone and&nbsp; Windows Store.</p>
</td>
</tr>
</tbody>
</table>]]></content:encoded>
    </item>
    <item>
      <title>How does WPF WebBrowser Control handle window.external.notify()?</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/how-does-wpf-webbrowser-control-handle-window-external-notify</link>
      <pubDate>Fri, 27 May 2011 08:55:00 GMT</pubDate>
      <dc:creator><![CDATA[Troy Martez [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2011/05/27/how-does-wpf-webbrowser-control-handle-window-external-notify/</guid>
      <description><![CDATA[Every now and then we get some really good questions that make us think. &nbsp;This was one of those...]]></description>
      <content:encoded><![CDATA[<p>Every now and then we get some really good questions that make us think. &nbsp;This was one of those questions. Here was the original <a href="https://twitter.com/#!/robertmclaws/status/72477969666408448">Tweet</a> that was sent our way.</p>
<p>For those of you unfamiliar with the context of the question, it comes from a Silverlight point of view. The developer would like to see how the WPF WebBrowser handles the interop communication between a WebBrowser Control and WPF acting as the main container for the app. Silverlight handles the communications between the hosted content and the Silverlight control using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.scriptnotify(VS.95).aspx"><span style="color: #0000ff;">WebBrowser.ScriptNotify</span></a> event..</p>
<p>The WPF WebBrowser control does something a little different. The WPF WebBrowser control uses the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.objectforscripting.aspx">ObjectForScripting</a> property. This property requires that the object have its <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.comvisibleattribute.aspx">ComVisibleAttribute</a> set to True and you are good to go. Here is an example&hellip;</p>
<p>In your Xaml:</p>
<pre class="scroll"><code class="html">&lt;WebBrowser x:Name=&rdquo;HtmlHost&rdquo; ObjectForScripting=&rdquo;HtmlInteropClass&rdquo; /&gt;</code></pre>
<p>In your code:</p>
<pre class="scroll"><code class="csharp">[System.Runtime.InteropServices.ComVisibleAttribute(True)]<br />
Public Class HtmlInteropClass<br />
{<br />
 Public void MyMethod(string SomeValue)<br />
 {<br />
  ((MainWindow)Application.Current.MainWindow).SomeTextBox.Text = SomeValue;<br />
 }<br />
}</code></pre>
<p>In your JavaScript:</p>
<pre class="scroll"><code class="js">&lt;script type=&rdquo;text/javaScript&rdquo;&gt;<br />
 Function wpfAppMethod(inputValue) {<br />
  Window.external.MyMethod(inputValue);<br />
 }<br />
&lt;/script&gt;</code></pre>
<p>One thing to note from the sample code above&hellip; Any ComVisibleAttribute that is set to True is available for use by window.external. This opens up many more opportunities to create better code that can fit your needs more precisely.</p>
<p>I&rsquo;ve attached a sample project that will provide a good start. For more reading on the WPF WebBrowser Control, you can start <a href="http://msdn.microsoft.com/en-us/library/cc491073.aspx">here</a>.</p>
<p>If you have any questions or comments, please let me know. Thanks!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/16/91/21/WpfHostingWebOCHostingSL.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-16-91-21/WpfHostingWebOCHostingSL.zip">WpfHostingWebOCHostingSL.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SystemColors Reference</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/systemcolors-reference</link>
      <pubDate>Tue, 30 Nov 2010 20:21:00 GMT</pubDate>
      <dc:creator><![CDATA[Pat Finnigan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2010/11/30/systemcolors-reference/</guid>
      <description><![CDATA[WPF exposes a swatch of colors that comprise the current Windows system theme.&nbsp; These are...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri; font-size: small;"></span><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span></p>
<p><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">WPF exposes a swatch of colors that comprise the current Windows system theme.&nbsp; These are available in the </span></span><a href="http://msdn.microsoft.com/en-us/library/system.windows.systemcolors.aspx" style="FONT-FAMILY: "><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">SystemColors</span></span></a><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"> class as </span></span><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.color.aspx" style="FONT-FAMILY: "><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Colors</span></span></a><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">, </span></span><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.brush.aspx" style="FONT-FAMILY: "><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Brushes</span></span></a><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">, and corresponding </span></span><a href="http://msdn.microsoft.com/en-us/library/system.windows.resourcekey.aspx" style="FONT-FAMILY: "><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">ResourceKeys</span></span></a><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"> (for binding with dynamic notification of changes to these colors, e.g. if the user switches Windows themes).&nbsp; This blog post contains a WPF tool to visually describe what Windows system colors are exposed through WPF and how these SystemColors members change as the Windows theme changes.&nbsp; Screenshots from the tool are contained in the blog post.</span></span></p>
<ul>
<li><a href="#PT1"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">SystemColors Swatch</span></span></a></li>
<li><a href="#PT2"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">Reference Tables - SystemColors tables for different Windows themes</span></span></a></li>
<li><a href="#PT3"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">What are the Windows system colors?</span></span></a></li>
<li><a href="#PT4"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">SystemColors in WPF</span></span></a></li>
<li><a href="#PT5"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;">Overriding SystemColors using ResourceKeys to skin WPF controls</span></span></a></li>
</ul>
<p>&nbsp;</p>
<h3><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><a name="PT1"></a>1.&nbsp;&nbsp; SystemColors Swatch</span></span></h3>
<p><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">This graph is intended as a quick reference for control authors.&nbsp; While creating the default Style and template&nbsp;for a control, pick colors from this table that give the desired look across different OS themes.&nbsp; </span></span><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/6266.swatch_Amalgam.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/6266.swatch_5F00_Amalgam.png" title="swatch_Amalgam.png" style="FONT-FAMILY: "><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Here's a direct link</span></span></a><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"> you can bookmark and use as a quick reference.&nbsp; (Note: Luna is deprecated and is&nbsp;only available on XP)</span></span></p>
<p class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span></o:p></span></span></span>&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/2248.swatch_Amalgam.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/700x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/2248.swatch_5F00_Amalgam.png" border="0" /><span style="FONT-FAMILY: 'Times New Roman','serif'; COLOR: black; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="BACKGROUND: white; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-family: Calibri;"></span></span>&nbsp; </p>
<p class="MsoNormal">&nbsp;</p>
<h3 class="MsoNormal"><span style="BACKGROUND: white; COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-family: Calibri;"><a name="PT2"></a>2<span style="font-family: arial,helvetica,sans-serif;">.&nbsp;<span style="font-size: small;">&nbsp; Reference Tables - SystemColors tables for different Windows themes</span></span></span></span><span style="FONT-FAMILY: 'Times New Roman','serif'; COLOR: black; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'"><o:p></o:p></span></h3>
<ul>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/5582.swatch_Aero.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/5582.swatch_5F00_Aero.png" title="swatch_Aero.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Aero</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/5187.swatch_Classic.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/5187.swatch_5F00_Classic.png" title="swatch_Classic.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Classic</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/3465.swatch_HC1.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/3465.swatch_5F00_HC1.png" title="swatch_HC1.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">High Contrast #1</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/6102.swatch_HC2.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/6102.swatch_5F00_HC2.png" title="swatch_HC2.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">High Contrast #2</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/5875.swatch_HCBlack.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/5875.swatch_5F00_HCBlack.png" title="swatch_HCBlack.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">High Contrast Black</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/8524.swatch_HCWhite.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/8524.swatch_5F00_HCWhite.png" title="swatch_HCWhite.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">High Contrast White</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/6545.swatch_LunaBlue.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/6545.swatch_5F00_LunaBlue.png" title="swatch_LunaBlue.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Luna Blue</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/4010.swatch_LunaGreen.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/4010.swatch_5F00_LunaGreen.png" title="swatch_LunaGreen.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Luna Olive Green</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/0131.swatch_LunaSilver.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/0131.swatch_5F00_LunaSilver.png" title="swatch_LunaSilver.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Luna Silver</span></span></a></span></o:p></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="background: yellow; mso-highlight: yellow;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><span style="background-color: #ffffff;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/4747.swatch_Royale.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/4747.swatch_5F00_Royale.png" title="swatch_Royale.png"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Royale</span></span></a></span></o:p></span></span></span></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="background: yellow; mso-highlight: yellow;"></span><o:p><span style="background-color: #ffff00;"></span></o:p></span></span><span style="font-size: small;"></span></p>
<p class="MsoNormal"><strong><span style="font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/SystemColors%20Reference/3482.SystemColorsSwatch.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64-SystemColors+Reference/3482.SystemColorsSwatch.zip">Here's the source</a> </span></strong>for the tool I used to create these tables, and it is also attached to the blog post.&nbsp; Check it out!</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<h3 class="MsoNormal"><span style="COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><a name="PT3"></a>3<span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">.&nbsp;&nbsp; What are the Windows system colors?</span></span></span></h3>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">Windows uses a set of colors to draw UI elements like highlight borders, text, shadows, control chrome, window frames, etc.<span style="mso-spacerun: yes;">&nbsp; </span>These colors can be retrieved and set using Windows APIs like </span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><a href="http://msdn.microsoft.com/en-us/library/ms724371(VS.85).aspx"><span style="color: blue;">GetSysColor</span></a></span><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">.<span style="mso-spacerun: yes;">&nbsp; </span>WPF applications expose these colors through managed wrappers as we&rsquo;ll see in the SystemColors class.</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">Each Windows theme specifies the system colors differently.<span style="mso-spacerun: yes;">&nbsp; </span>You can tweak the system colors yourself to create your own Windows theme, and WPF is able to pick up the colors the user has set in their theme so that WPF controls render to match the current theme.</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">To personalize your system colors on Win7, bring up the Appearance and Personalization config either through Desktop or Control Panel:</span></span></span>&nbsp;</p>
<p class="MsoNormal"><span style="mso-no-proof: yes;"><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image002.png"><span style="font-family: Calibri; font-size: small;"></span></v:imagedata></span><o:p></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><img height="406" width="360" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/3146.personalizeSystemColors1.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/3146.personalizeSystemColors1.png" border="0" />&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">C<span style="font-family: arial,helvetica,sans-serif;">lick on &ldquo;Window Color&rdquo; to customize the window glass color and other system colors:<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;"><span style="mso-no-proof: yes;"><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image004.png"></v:imagedata></span><o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><span style="font-size: small;"><span style="font-family: arial,helvetica,sans-serif;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/8420.personalizeSystemColors2.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/8420.personalizeSystemColors2.png" border="0" /></span></span>&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">C<span style="font-family: arial,helvetica,sans-serif;">hoose &ldquo;Advanced appearance settings&hellip;&rdquo;:<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="mso-no-proof: yes;"><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image006.png"><span style="font-family: Calibri; font-size: small;"></span></v:imagedata></span><o:p></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/0841.personalizeSystemColors3.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/0841.personalizeSystemColors3.png" border="0" />&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">H<span style="font-family: arial,helvetica,sans-serif;">ere you can configure the different system colors for Windows to use.<span style="mso-spacerun: yes;">&nbsp; </span>The combo box allows you to select a UI element, and the color picker enables you to assign colors and other properties for it:<span style="mso-spacerun: yes;">&nbsp; </span><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="mso-no-proof: yes;"><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image008.png"><span style="font-family: Calibri; font-size: small;"></span></v:imagedata></span><o:p></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/7608.personalizeSystemColors4.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/7608.personalizeSystemColors4.png" border="0" />&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">I<span style="font-family: arial,helvetica,sans-serif;">f you play around with these settings, you&rsquo;ll see native Windows applications and WPF applications transform by picking up on the color settings.<span style="mso-spacerun: yes;">&nbsp; </span>For example, if we change the black color for &ldquo;3D Objects&rdquo; to purple, then the foreground of certain UI elements picks this up:<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="mso-no-proof: yes;"><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image009.png"><span style="font-family: Calibri; font-size: small;"></span></v:imagedata></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/8750.windowsSystemColorsInAction.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/650x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/8750.windowsSystemColorsInAction.png" border="0" /></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">I<span style="font-family: arial,helvetica,sans-serif;">n general, don&rsquo;t worry about specifics here, like which settings affect which controls.<span style="mso-spacerun: yes;">&nbsp; </span>Just be aware that WPF controls bind to many of the colors and other parameters specified here.&nbsp; (Note: While WPF apps dynamically assume the new system colors when the Windows theme changes, the same cannot be said for tweaking individual system colors.&nbsp; If you are using a WPF app to calibrate changes to the Windows system colors, you should recycle the app between sets of changes.)</span></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p><span style="font-size: small;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: small;">&nbsp;</span></p>
<p><o:p><span style="font-family: Calibri; font-size: small;"><span style="COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span></span></o:p></p>
<h2 class="MsoNormal"><span style="COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><a name="PT4"></a>4<span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">.&nbsp;&nbsp; SystemColors in WPF</span></span></span></h2>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">WPF exposes Windows system colors through the </span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><a href="http://msdn.microsoft.com/en-us/library/system.windows.systemcolors.aspx"><span style="color: blue;">SystemColors</span></a></span><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;"> class as static </span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.color.aspx"><span style="color: blue;">Color</span></a></span><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">, </span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.brush.aspx"><span style="color: blue;">Brush</span></a></span><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">, and </span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><a href="http://msdn.microsoft.com/en-us/library/system.windows.resourcekey.aspx"><span style="color: blue;">ResourceKey</span></a></span><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;"> properties.<span style="mso-spacerun: yes;">&nbsp; </span>That is, for each unique system color exposed by WPF, there is a corresponding Color, ResourceKey for the Color, SolidColorBrush, and ResourceKey for the SolidColorBrush.<span style="mso-spacerun: yes;">&nbsp; </span>If you don&rsquo;t care about dynamic change notification, then in your XAML you can bind to the Brush directly:</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: blue;"><span style="mso-spacerun: yes;">&nbsp; </span>&lt;</span><span style="color: #a31515;">Button</span><span style="color: red;"> Background</span><span style="color: blue;">="{</span><span style="color: #a31515;">x</span><span style="color: blue;">:</span><span style="color: #a31515;">Static</span><span style="color: red;"> SystemColors</span><span style="color: blue;">.DesktopBrush}" .../&gt;<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><o:p><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"></span></span></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">&nbsp;</span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">However, control authors using SystemColors will likely want to bind to the resource keys instead so that they receive dynamic change notification.<span style="mso-spacerun: yes;">&nbsp; </span>For example, if you are retemplating Button but wanted to basically match the look of a Windows button, you could bind a template element&rsquo;s Background to SystemColors.ControlBrushKey using a </span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><a href="http://msdn.microsoft.com/en-us/library/ms748942.aspx"><span style="color: blue;">DynamicResource</span></a></span><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;"> reference:</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: #a31515;"><span style="mso-spacerun: yes;">&nbsp; </span></span><span style="color: blue;">&lt;</span><span style="color: #a31515;">ControlTemplate</span><span style="color: red;"> TargetType</span><span style="color: blue;">="Button"&gt;</span><o:p></o:p></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: #a31515;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span></span><span style="color: blue;">&lt;</span><span style="color: #a31515;">Grid</span><span style="color: blue;"> ...&gt;</span><o:p></o:p></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: #a31515;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="color: blue;">&lt;</span><span style="color: #a31515;">Border</span><span style="color: red;"> Background</span><span style="color: blue;">="{</span><span style="color: #a31515;">DynamicResource</span><span style="color: blue;"> {</span><span style="color: #a31515;">x</span><span style="color: blue;">:</span><span style="color: #a31515;">Static</span><span style="color: red;"> SystemColors</span><span style="color: blue;">.ControlBrushKey}}" ...&gt;</span><o:p></o:p></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: #a31515;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="color: blue;">&lt;</span><span style="color: #a31515;">ContentPresenter</span><span style="color: blue;"> /&gt;</span><o:p></o:p></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: #a31515;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="color: blue;">&lt;/</span><span style="color: #a31515;">Border</span><span style="color: blue;">&gt;</span><o:p></o:p></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: #a31515;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span></span><span style="color: blue;">&lt;/</span><span style="color: #a31515;">Grid</span><span style="color: blue;">&gt;</span><o:p></o:p></span></span></p>
<p class="MsoNormal" style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: #a31515;"><span style="mso-spacerun: yes;">&nbsp; </span></span><span style="color: blue;">&lt;/</span><span style="color: #a31515;">ControlTemplate</span><span style="color: blue;">&gt;<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="COLOR: black; FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><o:p><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"></span></span></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">&nbsp;</span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">By using the correct SystemColor (use the chart at the beginning of this blog post) in a control&rsquo;s template, the control will appear more natural under the different Windows themes (and even under many custom themes).<span style="mso-spacerun: yes;">&nbsp; </span>That way, instead of having to craft different templates for the different Windows themes to pick up theme-specific color settings, you achieve a theme-specific look automatically.</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><span style="font-family: Arial;">&nbsp;</span>&nbsp;</span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoListParagraph"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><span style="font-family: Times New Roman;"></span></span></span></p>
<h3 class="MsoNormal"><span style="FONT-FAMILY: 'Times New Roman','serif'; COLOR: black; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'"><a name="PT5"></a>5<span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">.&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">Overriding SystemColors using ResourceKeys to skin WPF controls</span></span></span></span></h3>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">We&rsquo;ve mentioned that stock WPF controls bind to certain SystemColors in their templates to achieve a look that matches up nicely with the current Windows theme.<span style="mso-spacerun: yes;">&nbsp; </span>In some cases you may want to change the way these stock controls look without having to retemplate them.<span style="mso-spacerun: yes;">&nbsp; </span>Styles can get you pretty far and allow you to set properties like Background, BorderBrush, BorderThickness, Margin, Padding, Foreground, etc.<span style="mso-spacerun: yes;">&nbsp; </span>Beyond that, you can use Triggers in Styles to set these properties differently for different control states.<span style="mso-spacerun: yes;">&nbsp; </span>However, some developers have gone the route of overriding SystemColors to achieve the desired look for these elements.</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">&nbsp;</span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">To override the system-supplied ControlDark color, for example, create a SolidColorBrush whose key is SystemColors.ControlDarkKey and place it in the target control&rsquo;s ResourceDictionary (or a ResourceDictionary walked by that control during resource resolution).</span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">&nbsp;</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">Here we should state that a control requiring you to go down this road is poorly designed (including parts of the WPF stock controls).<span style="mso-spacerun: yes;">&nbsp; </span>Styles should be sufficient for basic reskinning and colorization.<span style="mso-spacerun: yes;">&nbsp; </span>We don&rsquo;t advise using this practice, and we are studying this problem so that we may provide a better mechanism.</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">&nbsp;</span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">Further reading on this from Szymon Kobalczyk's blog:</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Times New Roman','serif'; COLOR: black; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'"><a href="http://geekswithblogs.net/kobush/archive/2007/03/25/109753.aspx"><span style="color: blue;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;">http://geekswithblogs.net/kobush/archive/2007/03/25/109753.aspx</span></span></span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">&nbsp;</span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">&nbsp;</span><span style="color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="color: black; mso-ascii-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;">The sample code for this tool is attached.<span style="mso-spacerun: yes;">&nbsp; </span>Happy skinning!</span></span></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/09/87/25/SystemColorsSwatch.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-09-87-25/SystemColorsSwatch.zip">SystemColorsSwatch.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Working Around RibbonWindow Dimensions Issues When Targeting .NET 3.5</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/working-around-ribbonwindow-dimensions-issues-when-targeting-net-3-5</link>
      <pubDate>Fri, 29 Oct 2010 14:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Pat Finnigan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2010/10/29/working-around-ribbonwindow-dimensions-issues-when-targeting-net-3-5/</guid>
      <description><![CDATA[For those targeting .NET 3.5, you will notice that RibbonWindow&rsquo;s Height, Width, Left, and Top...]]></description>
      <content:encoded><![CDATA[<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">For those targeting .NET 3.5, you will notice that RibbonWindow&rsquo;s Height, Width, Left, and Top properties are a little funky and can be misreported.<span style="mso-spacerun: yes;">&nbsp; </span>This article explains why RibbonWindow on .NET 3.5 has these issues, how the issues manifest, and how to work around them.<span style="mso-spacerun: yes;">&nbsp; </span>.NET 4.0 has no known issues with respect to RibbonWindow dimensions.<span style="mso-spacerun: yes;">&nbsp; </span>Window dimensions are a fragile area and trying to fix this at the RibbonWindow level leads to side effects, so our recommendation is to target .NET 4.0 for Ribbon apps or else use the simple workarounds described in this article.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<h2 class="MsoNoSpacing" style="margin: 0in 0in 0pt;"><span style="font-size: medium;">Why RibbonWindow reports dimensions inconsistently for .NET 3.5<o:p></o:p></span></h2>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">RibbonWindow derives from Window.<span style="mso-spacerun: yes;">&nbsp; </span>In .NET 3.5, there was an assumption that dimensions would be consistent for all native window instances of a given native style.<span style="mso-spacerun: yes;">&nbsp; </span>This was fine for normal WPF Windows but is invalid for windows like RibbonWindow that use WindowChrome because these windows do not have the same margins between the client and non-client RECTs:<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><span style="mso-no-proof: yes;"><v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f" id="_x0000_t75"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></v:path><o:lock v:ext="edit" aspectratio="t"></o:lock></v:shapetype><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image001.png"><span style="font-family: Calibri; font-size: small;"></span></v:imagedata></span><o:p></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/0447.clientVersusWindowRect.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/707x449/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/0447.clientVersusWindowRect.png" border="0" /></span></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Due to this assumption, RibbonWindow.Left/Height/Width/Height get reported incorrectly and have side effects when set programmatically:</span></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/6064.dimensionDifferences.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/310x257/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/6064.dimensionDifferences.png" border="0" /></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">In this screenshot, ActualWidth/ActualHeight/EffectiveLeft/EffectiveTop show the correct dimensions of the RibbonWindow.<span style="mso-spacerun: yes;">&nbsp; </span>Width/Height/Left/Top are reported incorrectly.<span style="mso-spacerun: yes;">&nbsp; </span>So where do these deltas in value come from?<span style="mso-spacerun: yes;">&nbsp; </span>Simple: they are the differences between the client RECT and the window RECT for a normal native window of a given native style (the gray shaded area in the first picture).<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: small;">These exact dimensions can be determined from </span><a href="http://msdn.microsoft.com/en-us/library/microsoft.windows.shell.systemparameters2.windownonclientframethickness.aspx"><span style="font-family: Calibri; font-size: small;">SystemParamaters2.WindowNonClientFrameThickness</span></a><span style="font-family: Calibri; font-size: small;">.<span style="mso-spacerun: yes;">&nbsp; </span>In the screen capture, we are running under the &ldquo;Classic&rdquo; theme, which reports the </span><a href="http://msdn.microsoft.com/en-us/library/system.windows.thickness.aspx"><span style="font-family: Calibri; font-size: small;">Thickness</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> 5, 29, 5, 5 (left, top, right, bottom) for WindowNonClientFrameThickness.<span style="mso-spacerun: yes;">&nbsp; </span>RibbonWindow.Width is reported 10 pixels too large because it assumes it should add the system default 5 pixels for the left non-client edge and 5 pixels for the right non-client edge, when in reality RibbonWindow&rsquo;s non-client frame has Thickness 0,0,0,0.<span style="mso-spacerun: yes;">&nbsp; </span>If you look at the other dimensions here and then at SystemParameters2.WindowNonClientFrameThickness for the system defaults, it makes sense why these dimension parameters are reported the way they are for RibbonWindow on .NET 3.5.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: small;">.NET 4.0 calls </span><a href="http://msdn.microsoft.com/en-us/library/ms633519(VS.85).aspx"><span style="font-family: Calibri; font-size: small;">GetWindowRect</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> for the real HWND instead of some system default, and thus reports and sets Height/Width/Left/Top correctly.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<h2 class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="font-size: medium;">Getting the effective RibbonWindow dimensions</span></span></span><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></h2>
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: small;">For RibbonWindow on .NET 3.5, use ActualWidth and ActualHeight to read the width and height values of the RibbonWindow.<span style="mso-spacerun: yes;">&nbsp; </span>These values come from </span><a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.rendersize.aspx"><span style="font-family: Calibri; font-size: small;">UIElement.RenderSize</span></a><span style="font-size: small;"><span style="font-family: Calibri;">, so RibbonWindow&rsquo;s abnormal lack of non-client frame does not matter.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">For reading left and top values, calculate the EffectiveLeft and EffectiveTop values.<span style="mso-spacerun: yes;">&nbsp; </span>These were shipped as APIs in Ribbon RTM (July 2010), but have been removed from the Ribbon October 2010 update based on feedback.<span style="mso-spacerun: yes;">&nbsp; </span>We want folks to eventually move to .NET 4.0 and beyond to take advantage of fixes for issues like this.<span style="mso-spacerun: yes;">&nbsp; </span>For those still targeting .NET 3.5, it only takes a few lines of code to add EffectiveLeft and EffectiveTop properties to your window class.<span style="mso-spacerun: yes;">&nbsp; </span>The attached sample project contains code for this, but in essence you just need to add WindowNonClientFrameThickness.Left to RibbonWindow.Left and add WindowNonClientFrameThickness.Top to RibbonWindow.Top when reporting Left and Top dimensions, respectively.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<h2 class="MsoNoSpacing"><span style="font-size: medium;"><span style="font-family: Calibri;">Setting RibbonWindow dimensions programmatically</span><o:p><span style="font-family: Calibri;">&nbsp;</span></o:p></span></h2>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">To effectively set RibbonWindow dimensions, we need to use interop.<span style="mso-spacerun: yes;">&nbsp; </span>If you try to set dimension properties directly then you will see weird side effects.<span style="mso-spacerun: yes;">&nbsp; </span>For example, setting RibbonWindow.Width will make RibbonWindow.Height grow programmatically on .NET 3.5.<span style="mso-spacerun: yes;">&nbsp; </span>As another manifestation, setting RibbonWindow.Left will shrink RibbonWindow.Top by a few pixels.<span style="mso-spacerun: yes;">&nbsp; </span>Here again, the degree of transformation comes from SystemParameters2.WindowNonClientFrameThickness due to assumptions about the non-client frame.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">It&rsquo;s actually quite easy to work around this, but we need to use a few lines of interop.<span style="mso-spacerun: yes;">&nbsp; </span></span></span><a href="http://msdn.microsoft.com/en-us/library/ms633545(VS.85).aspx"><span style="font-family: Calibri; font-size: small;">SetWindowPos</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> is the Win32 function we need to programmatically set both position and size of our RibbonWindow.<span style="mso-spacerun: yes;">&nbsp; </span>When setting width or height, first set the properties directly and then call SetWindowPos with the resultant values:<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 8pt; mso-bidi-font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span style="color: green;">// set height to 400<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">this</span>.Height = 400;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span style="color: #2b91af;">IntPtr</span> hwnd = <span style="color: blue;">new</span> <span style="color: #2b91af;">WindowInteropHelper</span>(<span style="color: blue;">this</span>).Handle;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span style="color: #2b91af;">NativeMethods</span>.SetWindowPos(hwnd, <span style="color: #2b91af;">IntPtr</span>.Zero, (<span style="color: blue;">int</span>)<span style="color: blue;">this</span>.EffectiveLeft, (<span style="color: blue;">int</span>)<span style="color: blue;">this</span>.EffectiveTop, (<span style="color: blue;">int</span>)<span style="color: blue;">this</span>.Width, (<span style="color: blue;">int</span>)<span style="color: blue;">this</span>.Height, <span style="color: #2b91af;">SWP</span>.NOZORDER | <span style="color: #2b91af;">SWP</span>.NOACTIVATE);<o:p></o:p></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">When setting left or top, just call SetWindowPos directly:<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><span style="font-size: 8pt; mso-bidi-font-size: 11.0pt;"><o:p><span style="font-family: Calibri;"></span></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span style="color: green;">// set left to 300<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: #2b91af; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>IntPtr</span><span style="font-family: Consolas; font-size: 9.5pt;"> hwnd = <span style="color: blue;">new</span> <span style="color: #2b91af;">WindowInteropHelper</span>(<span style="color: blue;">this</span>).Handle;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span style="color: #2b91af;">NativeMethods</span>.SetWindowPos(hwnd, <span style="color: #2b91af;">IntPtr</span>.Zero, 300, (<span style="color: blue;">int</span>)<span style="color: blue;">this</span>.EffectiveTop, (<span style="color: blue;">int</span>)Width, (<span style="color: blue;">int</span>)Height, <span style="color: #2b91af;">SWP</span>.NOZORDER | <span style="color: #2b91af;">SWP</span>.NOACTIVATE);<o:p></o:p></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Note that with these changes, RibbonWindow.Width and .Height are reported the same as .ActualWidth and .ActualHeight.<span style="mso-spacerun: yes;">&nbsp; </span>This code (and some test code to drive it) is contained in the attached sample project.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/08/32/74/RibbonWindowDimensionWorkarounds.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-08-32-74/RibbonWindowDimensionWorkarounds.zip">RibbonWindowDimensionWorkarounds.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Enabling ClearType for Ribbon Applications</title>
      <link>https://review.docs.microsoft.com/archive/blogs/wpf/enabling-cleartype-for-ribbon-applications</link>
      <pubDate>Fri, 29 Oct 2010 11:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Pat Finnigan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/wpf/2010/10/29/enabling-cleartype-for-ribbon-applications/</guid>
      <description><![CDATA[The Ribbon RTM release was built against .NET 3.5, but our&nbsp;October 2010 release of...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: Calibri; font-size: small;">The Ribbon RTM release was built against .NET 3.5, but our&nbsp;<a href="http://blogs.msdn.com/b/wpf/archive/2010/10/21/update-microsoft-ribbon-for-wpf-october-2010.aspx" title="October 2010 release of Ribbon">October 2010 release of Ribbon</a>&nbsp;includes both .NET 3.5 and .NET 4.0 Ribbon DLLs.<span style="mso-spacerun: yes">&nbsp; </span>With the v4.0 Ribbon, we have enabled ClearType on all of the Ribbon controls using </span><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.renderoptions.cleartypehint.aspx"><span style="font-family: Calibri; font-size: small;">RenderOptions.ClearTypeHint</span></a><span style="font-size: small;"><span style="font-family: Calibri;">.<span style="mso-spacerun: yes">&nbsp; </span>WPF applications using RibbonWindow must also opt-in to enable ClearType for all content below the Ribbon.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri; font-size: small;">This article describes ClearType technology and requirements and then specifies how a WPF Ribbon application enables ClearType.<span style="mso-spacerun: yes">&nbsp; </span>We refer to RibbonWindow and Ribbon applications specifically, but similar steps to enable ClearType apply for any WPF app that uses </span><a href="http://msdn.microsoft.com/en-us/library/microsoft.windows.shell.windowchrome.aspx"><span style="font-family: Calibri; font-size: small;">WindowChrome</span></a><span style="font-size: small;"><span style="font-family: Calibri;">.<o:p></o:p></span></span></p>
<ul>
<li>
<div class="MsoListParagraphCxSpFirst"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">I.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">What is ClearType and where is it available?<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">II.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Why is it necessary to opt in to ClearType when using RibbonWindow in Aero theme?<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">III.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">How WPF Ribbon achieves ClearType<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">IV.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Example: Enable ClearType for body text of RibbonWindow<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">V.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">IRTs and ClearTypeHint<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">VI.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Determining if text is rendering as ClearType<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">VII.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Conditional Compilation of ClearType for .NET 4.0<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">VIII.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Sample Code &amp; Related Links</span></span></div>
</li>
</ul>
<h2 class="MsoListParagraphCxSpMiddle"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: xx-small;">&nbsp;</span></span></span></span></h2>
<h2 class="MsoListParagraphCxSpMiddle"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">I.<span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="text-decoration: underline;">What is ClearType and where is it available?<o:p></o:p></span></span></h2>
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: small;">ClearType is a subpixel anti-aliasing technique for improving text smoothness.<span style="mso-spacerun: yes">&nbsp; </span>Wikipedia has a nice overview of the technology </span><a href="http://en.wikipedia.org/wiki/ClearType"><span style="font-family: Calibri; font-size: small;">here</span></a><span style="font-family: Calibri; font-size: small;">.<span style="mso-spacerun: yes">&nbsp; </span>WPF supports ClearType and extends ClearType in .NET 4 by allowing app developers to electively use ClearType on surfaces that are otherwise considered transparent and hence inappropriate for ClearType.<span style="mso-spacerun: yes">&nbsp; </span>Read more about WPF support for ClearType </span><a href="http://msdn.microsoft.com/en-us/library/ms749295.aspx"><span style="font-family: Calibri; font-size: small;">here</span></a><span style="font-size: small;"><span style="font-family: Calibri;">.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">ClearType support in WPF has a couple requirements:</span></span></p>
<ul>
<li>
<div class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span><span style="font-family: Calibri;"><span style="font-size: small;"><span style="text-decoration: underline;">Opaque<b style="mso-bidi-font-weight: normal"> </b>surface</span></span></span></div>
<ul>
<li>
<div class="MsoNoSpacing"><span style="font-family: Calibri;"><span style="font-size: small;"></span></span><span style="font-size: small;"><span style="font-family: Calibri;">ClearType is incompatible with alpha blending, so text cannot render as ClearType on top of a transparent background.<span style="mso-spacerun: yes">&nbsp; </span>In .NET 4.0, ClearTypeHint allows developers to enable ClearType where it is otherwise disabled, though this could make text worse or cause rendering issues when used over a non-opaque background.</span></span></div>
</li>
</ul>
</li>
<li>
<div class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span><span style="text-decoration: underline;"><span style="font-family: Calibri;"><span style="font-size: small;">OS support</span></span></span></div>
<ul>
<li>
<div class="MsoNoSpacing"><span style="text-decoration: underline;"><span style="font-family: Calibri;"><span style="font-size: small;"></span></span></span><span style="font-family: Calibri; font-size: small;">ClearType is available on all Windows OS&rsquo;s where WPF runs, starting with Windows XP.<span style="mso-spacerun: yes">&nbsp; </span>However, ClearType is only enabled by default on Vista &amp; later.<span style="mso-spacerun: yes">&nbsp; </span>So, Windows XP users must go through Control Panel to enable ClearType.<span style="mso-spacerun: yes">&nbsp; </span>More information is available in </span><a href="http://windowsclient.net/wpf/white-papers/wpftextclarity.aspx"><span style="font-family: Calibri; font-size: small;">this white paper</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> on WPF text clarity.<o:p></o:p></span></span></div>
</li>
</ul>
</li>
</ul>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p><span style="font-size: small;"><span style="font-family: Calibri;">Here is some text rendering as ClearType (shown at 800% magnification):</span></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span><img height="256" width="575" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/5226.bodyTextClearType.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/749x323/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/5226.bodyTextClearType.png" border="0" /></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Notice the red and the blue hues.<span style="mso-spacerun: yes">&nbsp; </span>These indicate the text is rendering on subpixel boundaries.<span style="mso-spacerun: yes">&nbsp; </span>Rendering this text on subpixel boundaries gives 3x higher horizontal resolution than rendering on pixel boundaries, although there is a chromatic cost &ndash; some color is introduced to create the smoothing effect.<span style="mso-spacerun: yes">&nbsp; </span>This snapshot was taken at 800% magnification, and when I zoom out to normal resolution the red and blue hues are unnoticeable and you see smooth text.<span style="mso-spacerun: yes">&nbsp;&nbsp;</span></span></span><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p>&nbsp;</p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri;"><span style="font-size: medium;"></span></span></o:p></p>
<h2 class="MsoListParagraph"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">II.</span><span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="text-decoration: underline;">Why is it necessary to opt in to ClearType when using RibbonWindow in Aero theme?<o:p></o:p></span></span></span></h2>
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: small;">Normal WPF 4.0 Window will support ClearType by default, so you get it for free.<span style="mso-spacerun: yes">&nbsp; </span>However, if you are using RibbonWindow, you need to opt in using the </span><a href="http://msdn.microsoft.com/en-us/library/system.windows.media.renderoptions.cleartypehint.aspx"><span style="font-family: Calibri; font-size: small;">RenderOptions.ClearTypeHint</span></a><span style="font-family: Calibri; font-size: small;"> attached property (System.Windows.Media namespace, PresentationCore.dll).<span style="mso-spacerun: yes">&nbsp; </span>This is necessary because RibbonWindow extends glass into the client area using </span><a href="http://msdn.microsoft.com/en-us/library/aa969512(VS.85).aspx"><span style="font-family: Calibri; font-size: small;">DwmExtendFrameIntoClientArea</span></a><span style="font-family: Calibri; font-size: small;">.<span style="mso-spacerun: yes">&nbsp; </span>(RibbonWindow claims the entire native window as client area so that it can draw the </span><a href="http://msdn.microsoft.com/en-us/library/dd940502(VS.85).aspx"><span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"><span style="font-family: Calibri; font-size: small;">Quick Access Toolbar</span></span></a><span style="font-size: small;"><span style="font-family: Calibri;"> in what is normally non-client area.<span style="mso-spacerun: yes">&nbsp; </span>Therefore, RibbonWindow must extend glass into the client area to attain the appearance of a normal Aero window.)<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">It is only necessary for RibbonWindow apps to set RenderOptions.ClearTypeHint for their Aero themes, but setting ClearTypeHint.Enabled for all themes shouldn&rsquo;t hurt.</span></span><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p>&nbsp;</p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<h2 class="MsoListParagraph"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">III.</span><span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="text-decoration: underline;">How WPF Ribbon achieves ClearType<o:p></o:p></span></span></span></h2>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">All of the WPF Ribbon controls render as ClearType as long as they are rendering against solid backgrounds (most controls are).<span style="mso-spacerun: yes">&nbsp; </span>Examine this screenshot:<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;<img height="420" width="742" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/5047.ribbonTextClearTypeVersusGrayscale.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/1162x676/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/5047.ribbonTextClearTypeVersusGrayscale.png" border="0" /></span></o:p></p>
<p class="MsoNoSpacing"><span style="mso-no-proof: yes"><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image003.png"><span style="font-family: Calibri; font-size: small;"></span></v:imagedata></span><o:p></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Notice how the &ldquo;Home&rdquo; RibbonTab is rendering as ClearType with warm and cold hues, while the RibbonTitlePanel&rsquo;s text is using grayscale anti-aliasing.<span style="mso-spacerun: yes">&nbsp; </span>This screenshot was taken on Win7 Aero, and the RibbonTitlePanel renders directly on glass, so it doesn&rsquo;t support ClearType.<span style="mso-spacerun: yes">&nbsp; </span>The grayscale text is choppier, while ClearType offers a general improvement in text clarity.&nbsp; The text sharpening provided by ClearType is a cumulative effect, so&nbsp;the improvement in clarity becomes more evident at the document/app level.</span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">The &ldquo;Home&rdquo; tab has ClearType &ldquo;because the v4.0 Template for RibbonTabHeader sets RenderOptions.ClearTypeHint=&ldquo;Enabled&rdquo; on its &ldquo;InnerBorder&rdquo; element.<span style="mso-spacerun: yes">&nbsp; </span>Other Ribbon controls set ClearTypeHint in their templates also, and the Ribbon sample apps (e.g. RibbonWindowSample.exe) set ClearTypeHint similarly in their XAML.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<h2 class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">IV.</span><span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="text-decoration: underline;">Example: Enable ClearType for body text of RibbonWindow<o:p></o:p></span></span></span></h2>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">While Ribbon is fully ClearType-enabled, an app using Ribbon must opt-in to ClearType for the Aero theme.<span style="mso-spacerun: yes">&nbsp; </span>To achieve this, we simply make sure RenderOptions.ClearTypeHint=&ldquo;Enabled&rdquo; is set wherever text is hosted.<span style="mso-spacerun: yes">&nbsp; </span>Examine the following XAML:<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">RibbonWindow</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> </span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">...&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Grid</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> x</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt">Name</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="LayoutRoot" ...&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> x</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt">Name</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="Ribbon" ... /&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Border</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> Grid.Row</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="1"&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">StackPanel</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">TextBlock</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> Text</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="ClearType ENABLED."</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> <b style="mso-bidi-font-weight: normal">RenderOptions.ClearTypeHint</b></span><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="Enabled"</span></b><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">/&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">TextBlock</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> Text</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="ClearType OFF."/&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">StackPanel</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Border</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Grid</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">RibbonWindow</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Running this on Win7 Aero produces the following text rendering:<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="mso-no-proof: yes"><v:imagedata src="file:///C:\Users\pafinnig\AppData\Local\Temp\1\msohtmlclip1\01\clip_image005.png"><span style="font-family: Calibri; font-size: small;"></span></v:imagedata></span><o:p></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"><img height="406" width="665" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/3005.clearTypeEnabledVsOff.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/811x503/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/3005.clearTypeEnabledVsOff.png" border="0" /></span></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Notice ClearType rendering in the top TextBlock, which opts in to ClearType.<span style="mso-spacerun: yes">&nbsp; </span>Besides the chromatic differences, from this screenshot it&rsquo;s not immediately obvious what improvements ClearType brings to the table.<span style="mso-spacerun: yes">&nbsp; </span>Bear in mind that ClearType rendering creates an accumulative effect to improve general text crispness.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Generally one should set RenderOptions.ClearTypeHint=&ldquo;Enabled&rdquo; at some root element, since the setting propagates down the visual tree unless another IRT (Intermediate Render Target, see next section) gets in the way.<span style="mso-spacerun: yes">&nbsp; </span>For example:<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">RibbonWindow</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> </span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">...&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Grid</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> </span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">...&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> </span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">.../&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Border</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> Grid.Row</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="1"</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> <b style="mso-bidi-font-weight: normal">RenderOptions.ClearTypeHint</b></span><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="Enabled"</span></b><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="mso-spacerun: yes">&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">StackPanel</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">TextBlock</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">My app</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">TextBlock</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Button</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> Width</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="Auto"</span><span style="FONT-FAMILY: Consolas; COLOR: red; FONT-SIZE: 9.5pt"> HorizontalAlignment</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">="Left"&gt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">body has</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Button</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Label</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ClearType!</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Label</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="mso-spacerun: yes">&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">StackPanel</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="mso-spacerun: yes">&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Border</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"><span style="mso-spacerun: yes">&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;</span></span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">Grid</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;</span><span style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;/</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ribbon</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">:</span><span style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">RibbonWindow</span><span style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">&gt;<o:p></o:p></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;<img height="476" width="583" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/3531.appBodyHasClearType.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/805x710/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/3531.appBodyHasClearType.png" border="0" /></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Notice that we set ClearTypeHint=&ldquo;Enabled&rdquo; on the Border element <b style="mso-bidi-font-weight: normal">below the Ribbon</b> rather than on the parent Grid that contains everything.<span style="mso-spacerun: yes">&nbsp; </span>This was deliberate &ndash; the Ribbon&rsquo;s quick access toolbar and title draw over the transparent glass at the top of the window, and setting ClearTypeHint=&ldquo;Enabled&rdquo; for text over transparent backgrounds may cause rendering issues.</span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<h2 class="MsoListParagraph"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">V.</span><span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="text-decoration: underline;">IRTs and ClearTypeHint<o:p></o:p></span></span></span></h2>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">IRT stands for Intermediate Render Target.<span style="mso-spacerun: yes">&nbsp; </span>An IRT is a common WPF graphics term used to refer to a surface that a tree of WPF visuals render to.<span style="mso-spacerun: yes">&nbsp; </span>Every separate visual tree (e.g. contents of a Popup in WPF) renders to a separate IRT. In addition, applying a Clip/Opacity to a Visual causes a new IRT to be generated.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">ClearTypeHint, when set, propagates to the subtree under that Visual that renders to the same IRT.<span style="mso-spacerun: yes">&nbsp; </span>If a descendant node in this subtree has a Clip applied to it or causes a new IRT to be created for another reason, it no longer honors the ClearTypeHint settings.<span style="mso-spacerun: yes">&nbsp; </span>These settings will need to be redefined on a Visual within the scope of this new IRT.<span style="mso-spacerun: yes">&nbsp; </span>A common instance where this behavior manifests is in the case of a ScrollContentPresenter of a ScrollViewer.<span style="mso-spacerun: yes">&nbsp; </span>A ScrollContentPresenter inherently clips the contents that are beyond the viewport.<span style="mso-spacerun: yes">&nbsp; </span>By doing so, it causes its contents to be rendered to a separate IRT.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Now consider a RichTextBox hosted in the content pane of a RibbonWindow.<span style="mso-spacerun: yes">&nbsp; </span>A RichTextBox&rsquo;s built-in template uses a ScrollViewer that contains a ScrollContentPresenter.<span style="mso-spacerun: yes">&nbsp; </span>Thus to turn on ClearType for text rendered within this ScrollContentPresenter, we must do two things:<o:p></o:p></span></span></p>
<ol>
<li>
<div class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Render an opaque Background within this ScrollContentPresenter.<o:p></o:p></span></span></div>
</li>
<li>
<div class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Set ClearTypeHint=&ldquo;Enabled&rdquo; within the scope of this ScrollContentPresenter.<o:p></o:p></span></span></div>
</li>
</ol>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: small;">The attached sample code demonstrates such usage.<span style="mso-spacerun: yes">&nbsp; </span>Similar techniques have been implemented in the RibbonControlsLibrary to enable ClearType for the various subcomponents within the Ribbon.<span style="mso-spacerun: yes">&nbsp; </span>For further reference, </span><a href="http://blogs.msdn.com/b/llobo/archive/2009/10/28/new-wpf-features-cleartypehint.aspx"><span style="font-family: Calibri; font-size: small;">Lester Lobo&rsquo;s blog</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> discusses IRTs and when to use ClearTypeHint in WPF.</span></span></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span>&nbsp;</p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<h2 class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></h2>
<h2 class="MsoListParagraph"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">VI.</span><span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="text-decoration: underline;">Determining if text is rendering as ClearType<o:p></o:p></span></span></span></h2>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">As seen in this article&rsquo;s screenshots, text rendering as ClearType has red and blue hues since glyphs cut across subpixel boundaries.<span style="mso-spacerun: yes">&nbsp; </span>It can be difficult to verify ClearType rendering at normal resolution, so we use a magnification technique to zoom in.<span style="mso-spacerun: yes">&nbsp; </span>Windows ships with a magnifier accessibility tool we can launch from the Start Menu:<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/64/0020.typeMagnifierIntoStartMenu2.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/936x239/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-38-64/0020.typeMagnifierIntoStartMenu2.png" border="0" /></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">When you magnify 800%-1000%, you can readily see the ClearType effect.<span style="mso-spacerun: yes">&nbsp; </span>The magnifier&rsquo;s Full screen mode works great on Aero but isn&rsquo;t available on other themes, so I often use MSPaint to magnify screenshots on non-Aero themes.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<h2 class="MsoListParagraph"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">VII.</span><span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="text-decoration: underline;">Conditional Compilation of ClearType for .NET 4.0<o:p></o:p></span></span></span></h2>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">ClearType is only available in .NET 4.0, but some WPF apps and custom controls may want to support both .NET 3.5 and 4.0, lighting up with ClearType on .NET 4.0.<span style="mso-spacerun: yes">&nbsp; </span>To support both platforms from a single codebase, some conditional compilation is required.<o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNoSpacing"><span style="font-family: Calibri; font-size: small;">Ribbon itself requires conditional compilation.<span style="mso-spacerun: yes">&nbsp; </span>The </span><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2bfc3187-74aa-4154-a670-76ef8bc2a0b4"><span style="font-family: Calibri; font-size: small;">Microsoft Ribbon for WPF Source and Samples MSI</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> includes a perl script that pushes XAML files for the Ribbon sample apps through the C preprocessor to create separate 3.5 and 4.0 XAML.<span style="mso-spacerun: yes">&nbsp; </span>The 4.0 XAML has ClearTypeHint specified in several control templates, and #ifdef directives in the XAML direct the conditional compilation.<span style="mso-spacerun: yes">&nbsp; </span><o:p></o:p></span></span></p>
<p class="MsoNoSpacing"><span style="text-decoration: underline;"><o:p><span style="TEXT-DECORATION: none"><span style="font-family: Calibri; font-size: small;"></span></span></o:p></span></p>
<p class="MsoNoSpacing"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;"></span></span></span>&nbsp;</p>
<h2 class="MsoNoSpacing"><span style="font-size: medium;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">VIII.</span><span style="line-height: normal; font-variant: normal; font-style: normal; font-family: 'Times New Roman'; font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="text-decoration: underline;">Sample Code &amp; Related Links<o:p></o:p></span></span></span></h2>
<p class="MsoNoSpacing"><span style="font-size: small;"><span style="font-family: Calibri;">Sample Code for this article is attached.</span></span></p>
<ul>
<li>
<div class="MsoNoSpacing"><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2bfc3187-74aa-4154-a670-76ef8bc2a0b4"><span style="font-family: Calibri; font-size: small;">Microsoft Ribbon for WPF</span></a><span style="font-family: Calibri;"><span style="font-size: small;"> &ndash; Download the WPF team&rsquo;s Ribbon release, a managed Ribbon implementation.</span></span></div>
<ul>
<li><span style="font-family: Calibri;"><span style="font-size: small;"></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Downloading the Ribbon MSI is necessary to run this article's samples.&nbsp; </span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="font-family: Calibri;"><span style="font-size: small;">You can also download the Ribbon Source &amp; Samples MSI from here.</span></span></span></span></li>
</ul>
</li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/08/31/77/RibbonClearTypeSamples.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-08-31-77/RibbonClearTypeSamples.zip">RibbonClearTypeSamples.zip</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>