<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Pavel&amp;#39;s Blog</title><subtitle type="html">Pavel is a software guy that is interested in almost everything software related... way too much for too little time</subtitle><id>http://blogs.microsoft.co.il/blogs/pavely/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/" /><link rel="self" type="application/atom+xml" href="http://blogs.microsoft.co.il/blogs/pavely/atom.aspx" /><generator uri="http://communityserver.org" version="3.1.20917.1142">Community Server</generator><updated>2009-10-13T10:52:12Z</updated><entry><title>Strange Bundle: WDK &amp; Debugging Tools</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2010/03/03/strange-bundle-wdk-amp-debugging-tools.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2010/03/03/strange-bundle-wdk-amp-debugging-tools.aspx</id><published>2010-03-03T12:20:06Z</published><updated>2010-03-03T12:20:06Z</updated><content type="html">&lt;p&gt;Microsoft has released an update &lt;a href="http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx" target="_blank"&gt;Windows Driver Kit (WDK)&lt;/a&gt; a few days ago, but with a new twist: The &lt;a href="http://www.microsoft.com/whdc/Devtools/Debugging/default.mspx" target="_blank"&gt;Debugging Tools for Windows&lt;/a&gt; are now bundled with the WDK and are no longer available as a free (and easy) download. The WDK is only available to MSDN subscribers and via the Microsoft Connect web site.&lt;/p&gt;  &lt;p&gt;This doesn’t make sense to me. Although WinDbg and friends are essential in the device driver world, they are just as important in the user mode world.&lt;/p&gt;  &lt;p&gt;I hope Microsoft reverts this decision and will once again allow free and easy download of the Debugging Tools For Windows. I think it’s a must.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=533550" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="Debugging" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Debugging/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="Internals" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Internals/default.aspx" /><category term="WinDbg" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/WinDbg/default.aspx" /><category term="Device Drivers" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Device+Drivers/default.aspx" /></entry><entry><title>Windows Platform Developers UG Session</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2010/02/24/windows-platform-developers-ug-session.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2010/02/24/windows-platform-developers-ug-session.aspx</id><published>2010-02-24T08:00:31Z</published><updated>2010-02-24T08:00:31Z</updated><content type="html">&lt;p&gt;Last night I delivered a session entitled “Writing Software Device Drivers on Windows” in the &lt;a href="http://www.microsoft.com/israel/communities/usergroups/wpd.mspx" target="_blank"&gt;Windows Platform Developers user group&lt;/a&gt;. I gave a “crash course” of 1.5 hours on writing a driver that allows me to execute code within the kernel to do things that are not possible from user mode.&lt;/p&gt;  &lt;p&gt;Thank you all for coming and for the great feedback!&lt;/p&gt;  &lt;p&gt;I’ve attached the presentation and the demo code, including the driver code, the installer and the client application. Note that to compile successfully with Visual Studio, the make command line in&lt;strong&gt; Project-&amp;gt;Properties&lt;/strong&gt; must point to the location of &lt;strong&gt;ddkbuild.cmd &lt;/strong&gt;(from &lt;a href="http://www.osr.com" target="_blank"&gt;OSR&lt;/a&gt;), that is also included in the attached ZIP.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:e6713488-b9f1-42ed-b557-32617b1e6f79" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;&lt;div&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/pavely/SoftareDriverDemo_7991BB0D.zip" target="_self"&gt;SoftareDriverDemo.zip&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=527523" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="C++" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2B002B00_/default.aspx" /><category term="Threading" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Threading/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="Win32" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Win32/default.aspx" /><category term="Internals" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Internals/default.aspx" /><category term="WinDbg" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/WinDbg/default.aspx" /><category term="Windows Platfrom User Group" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Windows+Platfrom+User+Group/default.aspx" /><category term="Device Drivers" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Device+Drivers/default.aspx" /></entry><entry><title>Next Windows Platform Developers UG Meeting</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2010/02/04/next-windows-platform-developers-ug-meeting.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2010/02/04/next-windows-platform-developers-ug-meeting.aspx</id><published>2010-02-04T08:03:15Z</published><updated>2010-02-04T08:03:15Z</updated><content type="html">&lt;p&gt;The next meeting will be held on March 23rd, at Microsoft Offices.&lt;/p&gt;  &lt;p&gt;This is the planned agenda:&lt;/p&gt;  &lt;p&gt;17:00-17:30    &lt;br /&gt;&lt;strong&gt;Gathering     &lt;br /&gt;&lt;/strong&gt;17:30-17:40 – MVP Summit impressions&lt;/p&gt;  &lt;p&gt;17:40-18:55   &lt;br /&gt;Title:&lt;strong&gt; Developing connectivity based products (Bluetooth, Wireless-LAN and GPS) in complex environment&lt;/strong&gt; – &lt;strong&gt;Alon Haze     &lt;br /&gt;&lt;/strong&gt;Project management and Software development for Bluetooth, Wireless-LAN and GPS for the handsets market is challenging. The environment is built from demanding cellular customers with strict requirements for low cost, low power, small size and highly integrated products. The development process requires multi-disciplinary expertise that covers silicon design, Firmware, Software, Hardware, System and RF experts. Putting all connectivity IPs inside one chip and supporting the customers with the Hardware and Software integration into their phones is far from being simple    &lt;br /&gt;During the lecture I will discuss the above topics and the ways we manage them in Texas Instruments Israel    &lt;br /&gt;&lt;strong&gt;About Alon Haze     &lt;br /&gt;&lt;/strong&gt;Alon is a Program Manager in Texas Instruments Israel. Alon joined Texas Instruments 11 years ago and was part of the team who started the connectivity business in TI. As part of his roles, Alon was a Software real-time embedded engineer, Software team leader and in the last 6 years he leads mobile Bluetooth, WLAN and GPS programs for the cellular market    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;18:55-19:15    &lt;br /&gt;&lt;strong&gt;Break     &lt;br /&gt;&lt;/strong&gt;    &lt;br /&gt;19:15-20:30     &lt;br /&gt;&lt;strong&gt;Introduction to programming software device drivers on Windows (or Device Driver programming 101) – Pavel Yosifovich&lt;/strong&gt;    &lt;br /&gt;In this session we’ll see how to write a simple kernel driver using the Windows Driver Kit and establish a connection between a client application and the driver. We’ll consider installation of the driver, exposing device objects and more    &lt;br /&gt;&lt;strong&gt;About Pavel Yosifovich&lt;/strong&gt;    &lt;br /&gt;Pavel is the CTO of Matrix Global and a senior instructor at Hi-Tech college. Prior to that, Pavel co-founded the startup Quiksee, where he was CTO, team leader and lead developer. He’s also a Microsoft MVP in Visual C++ and has more than 12 years of software development experience, specializing in Microsoft technologies&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Please register to the event &lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032441708&amp;amp;Culture=he-IL" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=514021" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="C++" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2B002B00_/default.aspx" /><category term="food" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/food/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="Internals" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Internals/default.aspx" /><category term="Fun" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Fun/default.aspx" /><category term="Native Development" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Native+Development/default.aspx" /><category term="Windows Platfrom User Group" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Windows+Platfrom+User+Group/default.aspx" /></entry><entry><title>The Return of the Class Wizard</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2010/01/24/the-return-of-the-class-wizard.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2010/01/24/the-return-of-the-class-wizard.aspx</id><published>2010-01-24T08:20:44Z</published><updated>2010-01-24T08:20:44Z</updated><content type="html">&lt;p&gt;Visual C++ 6 aficionados remember (fondly) the Class Wizard, most useful in MFC applications. The Class Wizard has gone away in later version of Visual Studio (2002, 2003, 2005, 2008), but is now making a smashing return in Visual Studio 2010 (Project menu –&amp;gt; Class Wizard or Ctrl+Shift+X).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/pavely/image_310E16CF.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/pavely/image_thumb_0D1519A8.png" width="483" height="405" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This has the familiar options (relative to VC++ 6), such as adding/removing message handlers, command and update command handlers, creating new classes, member variables, etc. There are new options, such as creating custom message handlers and the ability to search.&lt;/p&gt;  &lt;p&gt;In my experience, many developers back then were very dependent on the almighty Class Wizard, so the same warnings apply like any other wizard: use but do not abuse, and always, always – know what it does so you can do it yourself or undo it, if the need arises.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=506997" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="MFC" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/MFC/default.aspx" /><category term="C++" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2B002B00_/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="Visual Studio 2010" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Visual+Studio+2010/default.aspx" /></entry><entry><title>Gotcha: CreateProcess causes Access Violation</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2010/01/17/gotcha-createprocess-causes-access-violation.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2010/01/17/gotcha-createprocess-causes-access-violation.aspx</id><published>2010-01-17T09:39:43Z</published><updated>2010-01-17T09:39:43Z</updated><content type="html">&lt;p&gt;The famous &lt;a href="http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx" target="_blank"&gt;&lt;strong&gt;CreateProcess&lt;/strong&gt;&lt;/a&gt; function may fail with an access violation. For example, this innocent looking code causes a crash:&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:12pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#020002;"&gt;STARTUPINFO&lt;/span&gt; &lt;span style="color:#020002;"&gt;si&lt;/span&gt; = { &lt;span style="color:blue;"&gt;sizeof&lt;/span&gt;(&lt;span style="color:#020002;"&gt;si&lt;/span&gt;) };&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#020002;"&gt;PROCESS_INFORMATION&lt;/span&gt; &lt;span style="color:#020002;"&gt;pi&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#020002;"&gt;CreateProcess&lt;/span&gt;(0, &lt;span style="color:#020002;"&gt;_T&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;notepad&amp;quot;&lt;/span&gt;), 0, 0, &lt;span style="color:#020002;"&gt;FALSE&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; 0, 0, 0, &amp;amp;&lt;span style="color:#020002;"&gt;si&lt;/span&gt;, &amp;amp;&lt;span style="color:#020002;"&gt;pi&lt;/span&gt;);&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;What’s wrong with this code? Apparently nothing.&lt;/p&gt;  &lt;p&gt;The key here is that &lt;strong&gt;CreateProcess&lt;/strong&gt; is not actually a function at all, but a macro that’s expanded to &lt;strong&gt;CreateProcessA&lt;/strong&gt; or &lt;strong&gt;CreateProcessW&lt;/strong&gt; depending a compile time constant (UNICODE).&lt;/p&gt;  &lt;p&gt;If we open the docs, we find for the second argument: “The Unicode version of this function, &lt;a&gt;&lt;b&gt;CreateProcessW&lt;/b&gt;&lt;/a&gt;, can modify the contents of this string”.&lt;/p&gt;  &lt;p&gt;The string I passed is a constant string, coming from a region marked as “read only” and this is why the access violation occurs. Changing &lt;strong&gt;CreateProcess&lt;/strong&gt; to &lt;strong&gt;CreateProcessA &lt;/strong&gt;avoids the crash. The reason is that the A function translates the string to unicode and calls the W function. The translated string is in a read/write buffer, so no problem there. This should generally be avoided because of the extra step A functions do.&lt;/p&gt;  &lt;p&gt;In recent versions of Visual Studio the default libraries are unicode (as they should be, as the Windows 9x family of OSes is finally dead and buried). This is while a transition from (e.g.) Visual Studio 2003 to 2008 may cause old code to crash.&lt;/p&gt;  &lt;p&gt;So, the general solution should be:&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:12pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:#020002;"&gt;TCHAR&lt;/span&gt; &lt;span style="color:#020002;"&gt;name&lt;/span&gt;[] = &lt;span style="color:#020002;"&gt;_T&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Notepad.exe&amp;quot;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:#020002;"&gt;CreateProcess&lt;/span&gt;(0, &lt;span style="color:#020002;"&gt;name&lt;/span&gt;, 0, 0, &lt;span style="color:#020002;"&gt;FALSE&lt;/span&gt;, 0, 0, 0, &amp;amp;&lt;span style="color:#020002;"&gt;si&lt;/span&gt;, &amp;amp;&lt;span style="color:#020002;"&gt;pi&lt;/span&gt;);&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;This still doesn’t answer the question: why? Why would CreateProcessW want to write back to the supplied string? What could it possibly write? It can’t write arbitrary stuff as the size of the buffer is unknown to the function and can cause access violation or memory corruption. But it does write something back (looks like the same string passed to it). For me, it’s still a mystery.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=500588" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="C++" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2B002B00_/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="Win32" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Win32/default.aspx" /><category term="Internals" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Internals/default.aspx" /></entry><entry><title>WeakReferences and Events</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2010/01/07/weakreferences-and-events.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2010/01/07/weakreferences-and-events.aspx</id><published>2010-01-07T11:35:00Z</published><updated>2010-01-07T11:35:00Z</updated><content type="html">&lt;p&gt;One of the well-known pitfalls of using events, is the holding of the subscriber instance by the publisher (if connecting to a delegate holding an instance method). If the subscriber forgets to unsubscribe, the instance cannot be garbage collected because the publisher holds a reference to it. Worse yet, the subscriber continues to receive event notifications even though it’s not interested.&lt;/p&gt;  &lt;p&gt;One way to deal with this is presented in Jeffrey Richter’s book &lt;a href="http://www.amazon.com/CLR-via-Second-Pro-Developer/dp/B002V1H004/ref=sr_1_3?ie=UTF8&amp;amp;s=books&amp;amp;qid=1262863848&amp;amp;sr=1-3" target="_blank"&gt;“CLR via C#”&lt;/a&gt;. The idea is based on a custom event implementation holding a list of &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.weakreference.aspx" target="_blank"&gt;WeakReference&lt;/a&gt; &lt;/strong&gt;objects to the incoming subscribers delegates:&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:11pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;Publisher&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;&amp;gt; &lt;span style="color:#020002;"&gt;_subscribers&lt;/span&gt; = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;event&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt; &lt;span style="color:#020002;"&gt;TheEvent&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;add&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_subscribers&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Add&lt;/span&gt;(&lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;(&lt;span style="color:blue;"&gt;value&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;remove&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;//...&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;virtual&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; &lt;span style="color:#020002;"&gt;OnTheEvent&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;// raise the event&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;for&lt;/span&gt;(&lt;span style="color:blue;"&gt;int&lt;/span&gt; &lt;span style="color:#020002;"&gt;i&lt;/span&gt; = &lt;span style="color:#020002;"&gt;_subscribers&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Count&lt;/span&gt; - 1; &lt;span style="color:#020002;"&gt;i&lt;/span&gt; &amp;gt;= 0; &lt;span style="color:#020002;"&gt;i&lt;/span&gt;--) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt; &lt;span style="color:#020002;"&gt;eh&lt;/span&gt; = (&lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt;)&lt;span style="color:#020002;"&gt;_subscribers&lt;/span&gt;[&lt;span style="color:#020002;"&gt;i&lt;/span&gt;].&lt;span style="color:#020002;"&gt;Target&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt;(&lt;span style="color:#020002;"&gt;eh&lt;/span&gt; == &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;// delegate GC’d&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_subscribers&lt;/span&gt;.&lt;span style="color:#020002;"&gt;RemoveAt&lt;/span&gt;(&lt;span style="color:#020002;"&gt;i&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;else&lt;/span&gt;&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;// raise the event&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;eh&lt;/span&gt;(&lt;span style="color:blue;"&gt;this&lt;/span&gt;, &lt;span style="color:blue;font-weight:bold;"&gt;EventArgs&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Empty&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This approach has a fatal flaw: the &lt;strong&gt;WeakReference &lt;/strong&gt;wraps the &lt;strong&gt;delegate &lt;/strong&gt;object – not the subscriber instance itself! This means, that if a GC occurs, all the delegates in the list will be gone, disconnecting all subscribers, even those who are still very much alive.&lt;/p&gt;  &lt;p&gt;To correct this, we need to use a WeakReference around the subscriber instance itself and not the delegate. Here’s some code that accomplishes this:&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:11pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;Publisher&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:blue;font-weight:bold;"&gt;MethodInfo&lt;/span&gt;&amp;gt; &lt;span style="color:#020002;"&gt;_methods&lt;/span&gt; = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:blue;font-weight:bold;"&gt;MethodInfo&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;&amp;gt; &lt;span style="color:#020002;"&gt;_instances&lt;/span&gt; = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;event&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt; &lt;span style="color:#020002;"&gt;TheEvent&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;add&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_methods&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Add&lt;/span&gt;(&lt;span style="color:blue;"&gt;value&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Method&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt;(&lt;span style="color:blue;"&gt;value&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Target&lt;/span&gt; != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_instances&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Add&lt;/span&gt;(&lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;(&lt;span style="color:blue;"&gt;value&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Target&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;else&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_instances&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Add&lt;/span&gt;(&lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;(&lt;span style="color:blue;"&gt;value&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;remove&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //...&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; &lt;span style="color:#020002;"&gt;Fire&lt;/span&gt;() {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;for&lt;/span&gt;(&lt;span style="color:blue;"&gt;int&lt;/span&gt; &lt;span style="color:#020002;"&gt;i&lt;/span&gt; = &lt;span style="color:#020002;"&gt;_methods&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Count&lt;/span&gt; - 1; &lt;span style="color:#020002;"&gt;i&lt;/span&gt; &amp;gt;= 0; &lt;span style="color:#020002;"&gt;i&lt;/span&gt;--) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;object&lt;/span&gt; &lt;span style="color:#020002;"&gt;o&lt;/span&gt; = &lt;span style="color:#020002;"&gt;_instances&lt;/span&gt;[&lt;span style="color:#020002;"&gt;i&lt;/span&gt;].&lt;span style="color:#020002;"&gt;Target&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt;(&lt;span style="color:#020002;"&gt;o&lt;/span&gt; != &lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;if&lt;/span&gt;(&lt;span style="color:#020002;"&gt;o&lt;/span&gt;.&lt;span style="color:#020002;"&gt;GetType&lt;/span&gt;() == &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;WeakReference&lt;/span&gt;))&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ((&lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt;)&lt;span style="color:#020002;"&gt;o&lt;/span&gt;)(&lt;span style="color:blue;"&gt;this&lt;/span&gt;, &lt;span style="color:blue;font-weight:bold;"&gt;EventArgs&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Empty&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;else&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_methods&lt;/span&gt;[&lt;span style="color:#020002;"&gt;i&lt;/span&gt;].&lt;span style="color:#020002;"&gt;Invoke&lt;/span&gt;(&lt;span style="color:#020002;"&gt;o&lt;/span&gt;, &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;"&gt;object&lt;/span&gt;[] { &lt;span style="color:blue;"&gt;this&lt;/span&gt;, &lt;span style="color:blue;font-weight:bold;"&gt;EventArgs&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Empty&lt;/span&gt; });&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;else&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_methods&lt;/span&gt;.&lt;span style="color:#020002;"&gt;RemoveAt&lt;/span&gt;(&lt;span style="color:#020002;"&gt;i&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;_instances&lt;/span&gt;.&lt;span style="color:#020002;"&gt;RemoveAt&lt;/span&gt;(&lt;span style="color:#020002;"&gt;i&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Although this is somewhat involved, it solves the issue. It shouldn’t be too difficult to create some helper class to handle this in a generic way, to be used by any event publisher. (and the remove part must be completed…)&lt;/p&gt;  &lt;p&gt;Another approach would be to abandon the event idea and use an interface for notifications. Wrapping an interface by a &lt;strong&gt;WeakReference &lt;/strong&gt;is easy enough. The only downside – a subscriber must supply an object (cannot use static methods as callbacks) implementing the entire interface (even if only some methods are interesting).&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=488976" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term=".NET" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/.NET/default.aspx" /><category term="C#" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2300_/default.aspx" /><category term="CLR" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/CLR/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /></entry><entry><title>WPF’s Separator does not respect auto style</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/12/02/wpf-s-separator-does-not-respect-auto-style.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/12/02/wpf-s-separator-does-not-respect-auto-style.aspx</id><published>2009-12-02T11:46:35Z</published><updated>2009-12-02T11:46:35Z</updated><content type="html">&lt;p&gt;It’s something I came across, which seems like a bug to me. A WPF element can use a style automatically if the style uses the &lt;strong&gt;TargetType&lt;/strong&gt; property set to the type of that element and there is no &lt;strong&gt;x:Key&lt;/strong&gt; value. That is, there is no need for a (e.g. textual) key (the type is the key), and there is no need to specify a Style property for elements of that type.&lt;/p&gt;  &lt;p&gt;For some reason, the &lt;strong&gt;Separator&lt;/strong&gt; type, commonly found in menus and toolbars, does not respect it, and requires an explicit Style setting with an appropriate key.&lt;/p&gt;  &lt;p&gt;For example, this piece of XAML should make the separator a red line.&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;TargetType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Separator&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Template&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;strong&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;ControlTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;TargetType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Separator&amp;quot;&amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Border&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Background&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Red&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;ControlTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;For this menu:&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Menu&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;DockPanel.Dock&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Top&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Header&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;_File&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Header&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;_Open...&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Separator&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Header&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;E_xit&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Menu&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;But it doesn’t. To make this work, I must add a style key and apply it:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;TargetType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Separator&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;strong&gt;x&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;Key&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;strong&gt;=&amp;quot;sep1&amp;quot;&lt;/strong&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Template&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;ControlTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;TargetType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Separator&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Border&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Background&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Red&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;ControlTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Menu&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;DockPanel.Dock&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Top&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Header&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;_File&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Header&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;_Open...&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Separator&lt;/span&gt;&lt;span&gt; &lt;strong&gt;Style=&amp;quot;{&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;strong&gt;StaticResource&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt; sep1}&amp;quot;&lt;/strong&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Header&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;E_xit&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Menu&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:11pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;The result is:&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/pavely/image_225FA89B.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/pavely/image_thumb_0ED248FA.png" width="244" height="157" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=457217" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term=".NET" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/.NET/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="XAML" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/XAML/default.aspx" /><category term="WPF" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/WPF/default.aspx" /></entry><entry><title>C# 4.0 New Features Videos</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/25/c-4-0-new-features-videos.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/25/c-4-0-new-features-videos.aspx</id><published>2009-11-25T12:25:26Z</published><updated>2009-11-25T12:25:26Z</updated><content type="html">&lt;p&gt;Recently, I’ve given several sessions on “What’s new in C# 4.0?” in an MS Open House and the Nes Tziona User group.&lt;/p&gt;  &lt;p&gt;For those unable to attend, or just want some refreshing, I’ve created 3 videos on the main C# 4 features (“Optional and named arguments”, “dynamically typed objects” and “generic variance”). You can watch those on the &lt;a href="http://www.hi-tech.co.il/tv/" target="_blank"&gt;Hi-Tech TV&lt;/a&gt; web site.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=450809" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="video" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/video/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term=".NET 4.0" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/.NET+4.0/default.aspx" /><category term="C# 4.0" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2300_+4.0/default.aspx" /></entry><entry><title>What to expect in C++0x? (Video)</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/09/what-to-expect-in-c-0x-video.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/09/what-to-expect-in-c-0x-video.aspx</id><published>2009-11-09T12:51:24Z</published><updated>2009-11-09T12:51:24Z</updated><content type="html">&lt;p&gt;The upcoming new C++ standard, dubbed &lt;strong&gt;C++0x &lt;/strong&gt;(hopefully, &lt;strong&gt;x&lt;/strong&gt; will be a single (decimal) digit (9)) is quite intriguing, with many new features to the language and the supporting standard library. Here’s a &lt;a href="http://csclub.uwaterloo.ca/media/C++0x%20-%20An%20Overview.html" target="_blank"&gt;video&lt;/a&gt; of a lecture given by the inventor and original implementor of C++, &lt;a href="http://en.wikipedia.org/wiki/Bjarne_Stroustrup" target="_blank"&gt;Bjarne Stroustrup&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Very interesting, not just from the point of view of features, but design-wise and decision-wise as well.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=440421" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="C++" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2B002B00_/default.aspx" /><category term="video" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/video/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="C++0X" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2B002B00_0X/default.aspx" /></entry><entry><title>First Meeting of a New User Group</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/03/first-meeting-of-a-new-user-group.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/03/first-meeting-of-a-new-user-group.aspx</id><published>2009-11-03T14:57:23Z</published><updated>2009-11-03T14:57:23Z</updated><content type="html">&lt;p&gt;בשעה טובה מחר, יום רביעי, ה-4 לנובמבר בשעה 17:30 תתקיים הפגישה הראשונה של קבוצת משתמשים חדשה, &lt;a href="http://www.microsoft.com/israel/communities/usergroups/wpd.mspx" target="_blank"&gt;Windows Platform Developer&lt;/a&gt; , בהנהלת &lt;a href="http://blogs.microsoft.co.il/blogs/alon/" target="_blank"&gt;אלון פליס&lt;/a&gt; ואנוכי. הקבוצה תיפגש מידי חודש ביום רביעי הראשון בחודש.&lt;/p&gt;  &lt;p&gt;הקבוצה עוסקת בחלקים היותר פנימיים של Windows ושל טכנולוגיות הקשורות ל-Windows. דוגמאות לנושאים שיופיעו בעתיד הם:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;++C כולל הסטנדרט החדש&lt;/li&gt;    &lt;li&gt;Windows Internals&lt;/li&gt;    &lt;li&gt;Kernel Programming&lt;/li&gt;    &lt;li&gt;.NET Interop&lt;/li&gt;    &lt;li&gt;Advanced Debugging&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;ועוד.&lt;/p&gt;  &lt;p&gt;המפגש הראשון יעסוק ב-Windows 7. פירוט נוסף ניתן למצוא &lt;a href="http://msevents.microsoft.com/cui/EventDetail.aspx?EventID=1032430253&amp;amp;culture=he-IL" target="_blank"&gt;כאן&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=437545" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="Windows7" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Windows7/default.aspx" /><category term="Windows Platfrom User Group" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Windows+Platfrom+User+Group/default.aspx" /></entry><entry><title>WPF Control Extensions with Attached Properties</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/02/wpf-control-extensions-with-attached-properties.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/11/02/wpf-control-extensions-with-attached-properties.aspx</id><published>2009-11-02T13:33:28Z</published><updated>2009-11-02T13:33:28Z</updated><content type="html">&lt;p&gt;Sometimes we need some new functionality from a basic control. One way to go about it is to create a custom control and add that functionality. However, sometimes creating a new control is an overkill, especially when no new behaviour is actually needed. Perhaps some new way of presenting or drawing the control is all that’s needed.&lt;/p&gt;  &lt;p&gt;The problem is that we may want more properties on the control, but we don’t want or need to actually extend it (i.e. derive from it).&lt;/p&gt;  &lt;p&gt;For example, suppose we want to create a button with one of several images depending on its state: enabled, disabled or focused.&lt;/p&gt;  &lt;p&gt;Deriving from &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.button.aspx" target="_blank"&gt;Button&lt;/a&gt; seems too excessive: the images are not changing anything from a behaviour perspective. However, I would like to have new properties, such as &lt;strong&gt;NormalImage&lt;/strong&gt;, &lt;strong&gt;DisabledImage &lt;/strong&gt;and &lt;strong&gt;FocusedImage&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Adding properties to an existing class in WPF is possible through &lt;strong&gt;attached properties&lt;/strong&gt;. Attached properties are contextual; they are defined by one class, but may be used by &lt;strong&gt;any other class&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Continuing the example, I can look for some already define attached properties that match my intentions. More often than not, I won’t find any.&lt;/p&gt;  &lt;p&gt;To facilitate my image button, I can create a new class, define the attached properties by calling &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.dependencyproperty.registerattached.aspx" target="_blank"&gt;DependencyProperty.RegisterAttached&lt;/a&gt; and simply look for them in the appropriate class (the &lt;strong&gt;Button&lt;/strong&gt; in this case, when used with a style).&lt;/p&gt;  &lt;p&gt;Here’s an example: (you can add an attached property easily using Visual Studio with the &lt;strong&gt;propa &lt;/strong&gt;code snippet – just type &lt;strong&gt;propa &lt;/strong&gt;and hit Tab twice)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:10pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;sealed&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;ImageStates&lt;/span&gt; : &lt;span style="color:blue;font-weight:bold;"&gt;DependencyObject&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt; &lt;span style="color:#020002;"&gt;GetNormalImage&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;DependencyObject&lt;/span&gt; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;return&lt;/span&gt; (&lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt;)&lt;span style="color:#020002;"&gt;obj&lt;/span&gt;.&lt;span style="color:#020002;"&gt;GetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;NormalImageProperty&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; &lt;span style="color:#020002;"&gt;SetNormalImage&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;DependencyObject&lt;/span&gt; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;, &lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt; &lt;span style="color:#020002;"&gt;value&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;.&lt;span style="color:#020002;"&gt;SetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;NormalImageProperty&lt;/span&gt;, &lt;span style="color:#020002;"&gt;value&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;readonly&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt; &lt;span style="color:#020002;"&gt;NormalImageProperty&lt;/span&gt; =&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt;.&lt;span style="color:#020002;"&gt;RegisterAttached&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;NormalImage&amp;quot;&lt;/span&gt;, &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt;), &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;ImageStates&lt;/span&gt;), &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;UIPropertyMetadata&lt;/span&gt;(&lt;span style="color:blue;"&gt;null&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt; &lt;span style="color:#020002;"&gt;GetDisabledImage&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;DependencyObject&lt;/span&gt; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;return&lt;/span&gt; (&lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt;)&lt;span style="color:#020002;"&gt;obj&lt;/span&gt;.&lt;span style="color:#020002;"&gt;GetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;DisabledImageProperty&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; &lt;span style="color:#020002;"&gt;SetDisabledImage&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;DependencyObject&lt;/span&gt; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;, &lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt; &lt;span style="color:#020002;"&gt;value&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;.&lt;span style="color:#020002;"&gt;SetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;DisabledImageProperty&lt;/span&gt;, &lt;span style="color:#020002;"&gt;value&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;readonly&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt; &lt;span style="color:#020002;"&gt;DisabledImageProperty&lt;/span&gt; =&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt;.&lt;span style="color:#020002;"&gt;RegisterAttached&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;DisabledImage&amp;quot;&lt;/span&gt;, &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt;), &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;ImageStates&lt;/span&gt;), &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;UIPropertyMetadata&lt;/span&gt;(&lt;span style="color:blue;"&gt;null&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt; &lt;span style="color:#020002;"&gt;GetFocusedImage&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;DependencyObject&lt;/span&gt; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;return&lt;/span&gt; (&lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt;)&lt;span style="color:#020002;"&gt;obj&lt;/span&gt;.&lt;span style="color:#020002;"&gt;GetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;FocusedImageProperty&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; &lt;span style="color:#020002;"&gt;SetFocusedImage&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;DependencyObject&lt;/span&gt; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;, &lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt; &lt;span style="color:#020002;"&gt;value&lt;/span&gt;) {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;obj&lt;/span&gt;.&lt;span style="color:#020002;"&gt;SetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;FocusedImageProperty&lt;/span&gt;, &lt;span style="color:#020002;"&gt;value&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;readonly&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt; &lt;span style="color:#020002;"&gt;FocusedImageProperty&lt;/span&gt; =&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt;.&lt;span style="color:#020002;"&gt;RegisterAttached&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;FocusedImage&amp;quot;&lt;/span&gt;, &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;ImageSource&lt;/span&gt;), &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;ImageStates&lt;/span&gt;), &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;UIPropertyMetadata&lt;/span&gt;(&lt;span style="color:blue;"&gt;null&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I’ve created 3 attached properties in some class acting as a simple logical container for these properties.&lt;/p&gt;  &lt;p&gt;Now, I can create some buttons like so:&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Button&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Margin&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;4&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.NormalImage&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_open.png&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.DisabledImage&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_red.png&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.FocusedImage&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_open2.png&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Button&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Margin&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;4&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.NormalImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_open.png&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;IsEnabled&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;False&amp;quot;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.DisabledImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_red.png&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.FocusedImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_open2.png&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Button&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Margin&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;4&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.NormalImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_open.png&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.DisabledImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_red.png&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:black;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;local&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;ImageStates.FocusedImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;book_open2.png&amp;quot; &lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;font color="#000000" face="Tahoma"&gt;The attached properties are used in the correct “context”. These properties are not part of Button, but now are used by it (actually by the style and template that’s applied). The application of the templates can be done like so: (a bit crude)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;font color="#000000" face="Tahoma"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Application.Resources&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;TargetType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;Button&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style.Triggers&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Trigger&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;IsEnabled&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;True&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;ContentTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;DataTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Image&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Stretch&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;None&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Source&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Binding&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;RelativeSource&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;={&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;RelativeSource&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Mode&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;FindAncestor&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;,&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;AncestorType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;={&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;x&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Type&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Button&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;}},&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Path&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=(&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;local:ImageStates.NormalImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;)}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;DataTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Trigger&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Trigger&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;IsFocused&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;True&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;ContentTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;DataTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Image&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Stretch&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;None&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Source&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Binding&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;RelativeSource&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;={&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;RelativeSource&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Mode&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;FindAncestor&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;,&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;AncestorType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;={&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;x&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Type&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Button&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;}},&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Path&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=(&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;local:ImageStates.FocusedImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;)}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;DataTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Trigger&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Trigger&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;IsEnabled&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-gb;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;False&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Property&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;ContentTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;DataTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Image&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Stretch&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;None&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Opacity&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;.5&amp;quot;&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Source&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Binding&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;RelativeSource&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;={&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;RelativeSource&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Mode&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;FindAncestor&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;,&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; &lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt;AncestorType&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;={&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;x&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;:&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Type&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Button&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;}},&lt;/span&gt;&lt;span style="font-family:consolas;color:red;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:red;mso-style-textfill-fill-alpha:100.0%;"&gt; Path&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;=(&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;local:ImageStates.DisabledImage&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;)}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;DataTemplate&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter.Value&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Setter&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Trigger&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style.Triggers&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Style&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-align:left;margin-top:0pt;unicode-bidi:embed;direction:ltr;margin-bottom:0pt;margin-left:0in;word-break:normal;language:en-gb;mso-line-break-override:none;punctuation-wrap:hanging;"&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family:consolas;color:#a31515;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:#a31515;mso-style-textfill-fill-alpha:100.0%;"&gt;Application.Resources&lt;/span&gt;&lt;span style="font-family:consolas;color:blue;font-size:10pt;language:en-us;mso-ascii-font-family:consolas;mso-bidi-font-family:consolas;mso-font-kerning:12.0pt;mso-style-textfill-type:solid;mso-style-textfill-fill-color:blue;mso-style-textfill-fill-alpha:100.0%;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Here’s a screenshot of the result (top button is focused, middle is disabled):&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/pavely/image_0F97CE13.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/pavely/image_thumb_2C514328.png" width="244" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The attached ZIP is the complete project. Power to Attached Properties!&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:c6972a23-968c-4a0e-9c9f-fe0508918548" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;&lt;div&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/pavely/ImageButtons_2D662C47.zip" target="_self"&gt;ImageButtons.zip&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=436788" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term=".NET" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/.NET/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="XAML" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/XAML/default.aspx" /><category term="WPF" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/WPF/default.aspx" /></entry><entry><title>Open House on C# 4.0 (Take 2)</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/29/open-house-on-c-4-0-take-2.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/29/open-house-on-c-4-0-take-2.aspx</id><published>2009-10-29T10:05:19Z</published><updated>2009-10-29T10:05:19Z</updated><content type="html">&lt;p&gt;Yesterday, I delivered a session titled &lt;strong&gt;“What’s new in C# 4.0?”&lt;/strong&gt; after a session by &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg/" target="_blank"&gt;Guy Burstein&lt;/a&gt; on &lt;strong&gt;“First look at Visual Studio 2010”&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;Thank you all for attending. I apologise for not using all the feedbacks to select winners for the books – sorry, guys! I’ll pay attention next time (probably lack of food).&lt;/p&gt;  &lt;p&gt;Some notes that came up during the session:&lt;/p&gt;  &lt;p&gt;1. The misbehavior on the &lt;strong&gt;DynamicXmlElement&lt;/strong&gt; class was due to a small oversight: I wrote this code when only one element existed:&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:11pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;case&lt;/span&gt; 1:&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;result&lt;/span&gt; = &lt;span style="color:#020002;"&gt;elements&lt;/span&gt;.&lt;span style="color:#020002;"&gt;First&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;break&lt;/span&gt;;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;which returns the element as is (which is an &lt;strong&gt;XElement&lt;/strong&gt;, not what we want). It should have been:&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:11pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;case&lt;/span&gt; 1:&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#020002;"&gt;result&lt;/span&gt; = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#020002;"&gt;&lt;strong&gt;DynamicXmlElement&lt;/strong&gt;&lt;/span&gt;(&lt;span style="color:#020002;"&gt;elements&lt;/span&gt;.&lt;span style="color:#020002;"&gt;First&lt;/span&gt;());&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;break&lt;/span&gt;;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;So it continues to be a &lt;strong&gt;DynamicXmlElement&lt;/strong&gt; object. Again, lack of food.&lt;/p&gt;  &lt;p&gt;2. The other question I left somewhat open, is regarding caching in the ExpandoObject example. Well, no caching is possible – no special layer there, the code must run each time and do the right thing.&lt;/p&gt;  &lt;p&gt;The code samples will be available soon in the usual location as Guy described.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=432951" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term=".NET" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/.NET/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term=".NET 4.0" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/.NET+4.0/default.aspx" /><category term="C# 4.0" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/C_2300_+4.0/default.aspx" /></entry><entry><title>The Return (Appearance) of the Complex Type</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/27/the-return-appearance-of-the-complex-type.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/27/the-return-appearance-of-the-complex-type.aspx</id><published>2009-10-27T16:13:04Z</published><updated>2009-10-27T16:13:04Z</updated><content type="html">&lt;p&gt;Early in the ads for .NET 4.0, there were rumours about two types dealing with numeric stuff, &lt;a href="http://msdn.microsoft.com/en-us/library/system.numerics.biginteger%28VS.100%29.aspx" target="_blank"&gt;BigInteger&lt;/a&gt; and &lt;strong&gt;Complex&lt;/strong&gt;. In the Beta 1 phase, &lt;strong&gt;BigInteger&lt;/strong&gt; has appeared (I’ve briefly &lt;a href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/05/26/biginteger-in-net-4-0.aspx" target="_blank"&gt;blogged&lt;/a&gt; about it), but &lt;strong&gt;Complex&lt;/strong&gt; was nowhere to be found.&lt;/p&gt;  &lt;p&gt;With the advent of .NET 4.0 Beta 2, I was happy to find the emergence of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.numerics.complex%28VS.100%29.aspx" target="_blank"&gt;Complex&lt;/a&gt; type in the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.numerics%28VS.100%29.aspx" target="_blank"&gt;System.Numerics&lt;/a&gt;&lt;/strong&gt; namespace (and these numeric types have been moved to their own &lt;strong&gt;System.Numerics.Dll&lt;/strong&gt; assembly).&lt;/p&gt;  &lt;p&gt;Complex is, of course, represents a complex number, with a &lt;a href="http://msdn.microsoft.com/en-us/library/system.numerics.complex.real%28VS.100%29.aspx" target="_blank"&gt;Real&lt;/a&gt; part and an &lt;a href="http://msdn.microsoft.com/en-us/library/system.numerics.complex.imaginary%28VS.100%29.aspx" target="_blank"&gt;Imaginary&lt;/a&gt; part. It hosts all the usual expected properties and methods, including operator overloading and conversions.&lt;/p&gt;  &lt;p&gt;One mishap, I believe, is the existence of a &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.numerics.complex.magnitude%28VS.100%29.aspx" target="_blank"&gt;Magnitude&lt;/a&gt;&lt;/strong&gt; property, returning the length of the complex number as measured from the origin, but no &lt;strong&gt;MagnitudeSquared&lt;/strong&gt; property, which is an optimization – as sometimes this is what is needed and the overhead of performing a square root for the &lt;strong&gt;Magnitude &lt;/strong&gt;property is unnecessary (&lt;strong&gt;Magnitude&lt;/strong&gt; is calculated with the super famous &lt;a href="http://en.wikipedia.org/wiki/Pythagorean_theorem" target="_blank"&gt;pythagorean theorem&lt;/a&gt;, requiring a costly square root operation).&lt;/p&gt;  &lt;p&gt;Hopefully, this property will be added in the .NET 4.0 RTM.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=431325" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term=".NET 4.0" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/.NET+4.0/default.aspx" /><category term="Numerics" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Numerics/default.aspx" /></entry><entry><title>Local Kernel Debugging and LiveKd Update</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/27/local-kernel-debugging-and-livekd-update.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/27/local-kernel-debugging-and-livekd-update.aspx</id><published>2009-10-27T09:13:22Z</published><updated>2009-10-27T09:13:22Z</updated><content type="html">&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc266422.aspx" target="_blank"&gt;Local kernel debugging&lt;/a&gt; is the ability to view kernel data structures in a live system (i.e. not connecting to a target system through a null cable modem or USB or other alternatives), and is supported since Windows XP. This is a great way to explore windows on its darker side (the kernel and related subsystems) with all its mysteries and secrets.&lt;/p&gt;  &lt;p&gt;With Windows XP, starting local kernel debugging is pretty easy. Just fire up &lt;a href="http://en.wikipedia.org/wiki/WinDbg" target="_blank"&gt;WinDbg&lt;/a&gt; (or &lt;strong&gt;kd&lt;/strong&gt; for that matter), select from the menu File-&amp;gt;Kernel Debug, navigate to the “Local” tab, click OK and start exploring.&lt;/p&gt;  &lt;p&gt;In Windows Vista and up, trying to do the same thing produces the following message box:&lt;/p&gt;  &lt;p&gt;“---------------------------   &lt;br /&gt;WinDbg:6.11.0001.404 AMD64     &lt;br /&gt;---------------------------    &lt;br /&gt;The system does not support local kernel debugging. &lt;/p&gt;  &lt;p&gt;Local kernel debugging requires Windows XP, Administrative   &lt;br /&gt;privileges, and is not supported by WOW64.    &lt;br /&gt;Only a single local kernel debugging session can run at a time.    &lt;br /&gt;&lt;strong&gt;Local kernel debugging is disabled by default in Windows Vista, you must run &amp;#39;bcdedit -debug on&amp;#39; and reboot to enable it.”&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The bold section is the important part. On Vista and up (not &lt;strong&gt;just&lt;/strong&gt; Vista, as may be suggested by the error message), this is disabled by default, and requires change in the Boot Configuration Database (BCD) and reboot. Doesn’t seem to difficult to do; however, setting this option disables the ability to do user mode debugging (e.g. with Visual Studio)… not nice.&lt;/p&gt;  &lt;p&gt;The life saver here is &lt;a href="http://blogs.technet.com/markrussinovich/" target="_blank"&gt;Mark Russinovich&lt;/a&gt; from the famous &lt;a href="http://technet.microsoft.com/en-us/sysinternals/default.aspx" target="_blank"&gt;SysInternals&lt;/a&gt; site and tools (now part of Microsoft). He wrote the &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897415.aspx" target="_blank"&gt;livekd&lt;/a&gt; tool, that simulates a “blue screen” and creates a dump file, then opens it with your favourite kernel debugger (WinDbg or kd). For example, issuing &lt;strong&gt;Livekd –w&lt;/strong&gt; (assuming WinDbg is in the default search path, or livekd is copied to the &lt;a href="http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx" target="_blank"&gt;Debugging Tools For Windows&lt;/a&gt; folder and you’re running with admin privileges), this launches WinDbg and allows local kernel debugging.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Livekd&lt;/strong&gt; was not working properly on newer systems (x64) but finally a new version was released, fixing that issue, allowing local kernel debugging on x64 systems on Vista and up.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=431067" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="Debugging" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Debugging/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="Internals" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/Internals/default.aspx" /></entry><entry><title>WPF Gotcha: Default Value for a Dependency Property</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/13/wpf-gotcha-default-value-for-a-dependency-property.aspx" /><id>http://blogs.microsoft.co.il/blogs/pavely/archive/2009/10/13/wpf-gotcha-default-value-for-a-dependency-property.aspx</id><published>2009-10-13T09:52:12Z</published><updated>2009-10-13T09:52:12Z</updated><content type="html">&lt;p&gt;When defining dependency properties in a WPF (e.g. in a user control or custom control), you can supply a default value for that property. However, if you’re not careful, you’ll get a nasty exception at runtime, with no obvious cause.&lt;/p&gt;  &lt;p&gt;For example, consider this simple dependency property:&lt;/p&gt;  &lt;div style="font-family:consolas;background:white;color:black;font-size:11pt;"&gt;   &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;double&lt;/span&gt; &lt;span style="color:#020002;"&gt;SomeLength&lt;/span&gt; {&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;get&lt;/span&gt; { &lt;span style="color:blue;"&gt;return&lt;/span&gt; (&lt;span style="color:blue;"&gt;double&lt;/span&gt;)&lt;span style="color:#020002;"&gt;GetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;SomeLengthProperty&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;set&lt;/span&gt; { &lt;span style="color:#020002;"&gt;SetValue&lt;/span&gt;(&lt;span style="color:#020002;"&gt;SomeLengthProperty&lt;/span&gt;, &lt;span style="color:blue;"&gt;value&lt;/span&gt;); }&lt;/p&gt;    &lt;p style="margin:0px;"&gt;}&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;readonly&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt; &lt;span style="color:#020002;"&gt;SomeLengthProperty&lt;/span&gt; =&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;font-weight:bold;"&gt;DependencyProperty&lt;/span&gt;.&lt;span style="color:#020002;"&gt;Register&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;SomeLength&amp;quot;&lt;/span&gt;, &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;"&gt;double&lt;/span&gt;),&lt;/p&gt;    &lt;p style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:blue;font-weight:bold;"&gt;SomeControl&lt;/span&gt;), &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:blue;font-weight:bold;"&gt;UIPropertyMetadata&lt;/span&gt;(0));&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;When running the application hosting the control declaring this property, you’ll get a nasty &lt;strong&gt;XamlParseException&lt;/strong&gt;. Looking at the InnerException, you’ll see something like:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;{&amp;quot;Exception has been thrown by the target of an invocation.&amp;quot;}&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Great. Probably some reflection exception. Let’s look at its InnerException:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;{&amp;quot;The type initializer for &amp;#39;CustomControls.SomeControl&amp;#39; threw an exception.&amp;quot;}&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;That’s a bit more helpful. It must be the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.dependencyproperty.register.aspx" target="_blank"&gt;DependencyProperty.Register&lt;/a&gt; method (called from the static constructor a.k.a. type initializer).&lt;/p&gt;  &lt;p&gt;So, what’s going on here? Experienced WPF developers may spot this immediately. The problem is the &lt;strong&gt;default value of 0&lt;/strong&gt;. What’s wrong with that? Can’t a double be zero? It can, but what’s missing is the value zero in a double look: &lt;strong&gt;0.0&lt;/strong&gt; or &lt;strong&gt;(double)0&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Why is this happening? Simply because the argument &lt;strong&gt;Register&lt;/strong&gt; expects is of type object. Passing a value type causes boxing. No surprise here. But when unboxing occurs – an exception is triggered, because a &lt;strong&gt;0&lt;/strong&gt; (int)&lt;strong&gt; &lt;/strong&gt;cannot be unboxed to a double without an intermediate cast (which, of course, is not supplied, as everything is too dynamic for that).&lt;/p&gt;  &lt;p&gt;So, the moral of the story is: keep your default values with the &lt;strong&gt;exact&lt;/strong&gt; type declared in the dependency property.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=424426" width="1" height="1"&gt;</content><author><name>pavely</name><uri>http://blogs.microsoft.co.il/members/pavely.aspx</uri></author><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/DEV/default.aspx" /><category term="WPF" scheme="http://blogs.microsoft.co.il/blogs/pavely/archive/tags/WPF/default.aspx" /></entry></feed>