<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>ailon's DevBlog</title>
    <description>Development related stuff in my life</description>
    <link>http://devblog.ailon.org/devblog/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.0.7</generator>
    <language>en-GB</language>
    <blogChannel:blogRoll>http://devblog.ailon.org/devblog/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Alan Mendelevich</dc:creator>
    <dc:title>ailon's DevBlog</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/devblogailonorg" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Writing WPF/Silverlight compatible code. Part 2: Dependency Properties</title>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note for future readers&lt;/strong&gt;: These series discuss WPF and Silverlight versions that are current stable versions at the time of this writing – WPF 3.5 and Silverlight 3.&lt;/em&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;These are ongoing series of posts on the subject of WPF/Silverlight compatibility. New posts will be added to the &lt;a href="http://devblog.ailon.org/devblog/post/2009/11/05/Writing-WPFSilverlight-compatible-code-Table-of-Contents.aspx"&gt;Table of Contents post&lt;/a&gt; as they are written so bookmark that post or just &lt;a href="http://feeds.feedburner.com/devblogailonorg"&gt;subscribe to my RSS feed&lt;/a&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;h2&gt;DependencyProperty.Register&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms752914.aspx"&gt;Dependency properties&lt;/a&gt; are one of the core concepts of both WPF and Silverlight. To register a dependency property you use DependencyProperty.Register() method. WPF 3.5 has &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.dependencyproperty.register.aspx"&gt;3 overloads&lt;/a&gt; for that method while Silverlight has &lt;a href="http://msdn.microsoft.com/en-us/library/ms597502%28VS.95%29.aspx"&gt;only one&lt;/a&gt;.&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; DependencyProperty Register(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; name,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     Type propertyType,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     Type ownerType,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     PropertyMetadata typeMetadata&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; )&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Obviously if you want to create cross-platform code you should use &lt;a href="http://msdn.microsoft.com/en-us/library/ms597502.aspx"&gt;that one method&lt;/a&gt; all the time in WPF.&lt;/p&gt;

&lt;h2&gt;No FrameworkPropertyMetadata&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;For most WPF framework-level application development purposes, &lt;strong&gt;FrameworkPropertyMetadata&lt;/strong&gt; is the type used for dependency property metadata, rather than the base metadata types &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.propertymetadata.aspx"&gt;PropertyMetadata&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.uipropertymetadata.aspx"&gt;UIPropertyMetadata&lt;/a&gt;.&lt;/p&gt;

  &lt;p&gt;from &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.frameworkpropertymetadata.aspx"&gt;MSDN&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;&lt;/em&gt;Unfortunately there’s no FrameworkPropertyMetadata class in Silverlight. &lt;/p&gt;

&lt;p&gt;One of the most used improvements of FrameworkPropertyMetadata over &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.propertymetadata.aspx"&gt;PropertyMetadata&lt;/a&gt; are Boolean settings that control invalidation of various layout aspects of the object such as AffectsMeasure, AffectsArrange, etc. If some of these settings are set to true, corresponding aspect is invalidated when property value changes.&lt;/p&gt;

&lt;p&gt;Fortunately it’s not too difficult to mimic this behavior using PropertyMetadata and &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.propertychangedcallback%28VS.95%29.aspx"&gt;PropertyChangedCallback&lt;/a&gt;. So if you would write something like this for WPF-only application:&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;readonly&lt;/span&gt; DependencyProperty SomethingProperty = DependencyProperty.Register(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #006080"&gt;&amp;quot;Something&amp;quot;&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;), &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(Window1),&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; FrameworkPropertyMetadata(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Empty,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;         FrameworkPropertyMetadataOptions.AffectsMeasure)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;         );&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;you can rewrite it this way to work in both WPF and Silverlight:&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;readonly&lt;/span&gt; DependencyProperty SomethingProperty = DependencyProperty.Register(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #006080"&gt;&amp;quot;Something&amp;quot;&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;), &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(Window1),&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyMetadata(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Empty,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyChangedCallback(Window1.SomethingProperty_Changed))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;         );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SomethingProperty_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;     ((FrameworkElement)d).InvalidateMeasure();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;To make life easier you can create a helper class with methods for invalidating various aspects and combinations and use methods from that class for properties that do nothing else on change. 
  &lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;No Value Coercion&lt;/h2&gt;

&lt;p&gt;WPF includes a powerful mechanism for value coercion.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Coerce value callbacks do pass the specific &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.dependencyobject.aspx"&gt;DependencyObject&lt;/a&gt; instance for properties, as do &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.propertychangedcallback.aspx"&gt;PropertyChangedCallback&lt;/a&gt; implementations that are invoked by the property system whenever the value of a dependency property changes. Using these two callbacks in combination, you can create a series of properties on elements where changes in one property will force a coercion or reevaluation of another property.&lt;/p&gt;

  &lt;p&gt;A typical scenario for using a linkage of dependency properties is when you have a user interface driven property where the element holds one property each for the minimum and maximum value, and a third property for the actual or current value. Here, if the maximum was adjusted in such a way that the current value exceeded the new maximum, you would want to coerce the current value to be no greater than the new maximum, and a similar relationship for minimum to current.&lt;/p&gt;

  &lt;p&gt;from &lt;a href="http://msdn.microsoft.com/en-us/library/ms745795.aspx#Coerce_Value_Callbacks_and_Property_Changed_Events"&gt;MSDN&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Unfortunately there’s no such mechanism in Silverlight. You’ll have to deal with scenarios like the one above by just using a combination of PropertyChangedCallbacks and regular methods. In some complicated but not critical scenarios you might find it reasonable to use value coercion in WPF and just leave uncoerced values in Silverlight. You can do this by forking your code as described in &lt;a href="http://devblog.ailon.org/devblog/post/2009/11/02/Writing-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx"&gt;part 1 of these series&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;No OverrideMetadata()&lt;/h2&gt;

&lt;p&gt;WPF let’s you override property metadata. You can do this using &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.dependencyproperty.overridemetadata.aspx"&gt;OverrideMetadata&lt;/a&gt; method of DependencyProperty. In the code below we override the default width of our control inherited from Control class.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; MyControl()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     FrameworkPropertyMetadata newMetadata = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; FrameworkPropertyMetadata();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     newMetadata.DefaultValue = 180.0;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     Control.WidthProperty.OverrideMetadata(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(MyControl), newMetadata);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Again, there’s no OverrideMetadata in Silverlight. When you just want to change the default value of some property you can simply set the value in your default public constructor.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; MyControl()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Width = 180;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;However I'm not sure if or how you can set new PropertyChangedCallback on inherited property in Silverlight. Let me know in the comments if you do.&lt;/p&gt;

&lt;h2&gt;No read-only dependency properties&lt;/h2&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;One of the really nice features in WPF are &lt;a href="http://msdn.microsoft.com/en-us/library/ms754044.aspx"&gt;read-only dependency properties&lt;/a&gt;. These are very useful when you need to have a property reflecting some internally determined state of your object (like IsMouseOver property) and don’t want other developers to be able to change the value from the outside. You can easily do this with regular .NET properties but what if you want a read-only property while still enjoying all the perks of dependency property mechanism?&lt;/p&gt;

&lt;p&gt;Unfortunately I have no workaround for Silverlight. Sure, you can create a regular CLR property wrapper for dependency property having only the get accessor, but this wont stop anyone from setting the value using SetValue() method.&lt;/p&gt;

&lt;p&gt;So you’ll have to make a choice here (unless you find some really working solution): either forget about read-only dependency properties altogether or use separate code (either using &lt;a href="http://devblog.ailon.org/devblog/post/2009/11/02/Writing-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx"&gt;pre-processor directives or partial classes&lt;/a&gt;) for WPF and Silverlight. Just remember that you’ll have to use different code for not only your dependency property declarations, but SetValue calls, too (you use SetValue() on DependencyPropertyKey with read-only properties). So things can really get messy with constant #if SILVERLIGHT forking.&lt;/p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdevblog.ailon.org%2fdevblog%2fpost%2f2009%2f11%2f05%2fWriting-WPFSilverlight-compatible-code-Part-2-Dependecy-Properties.aspx"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdevblog.ailon.org%2fdevblog%2fpost%2f2009%2f11%2f05%2fWriting-WPFSilverlight-compatible-code-Part-2-Dependecy-Properties.aspx" /&gt;&lt;/a&gt; &lt;a href="http://dotnetshoutout.com/Writing-WPFSilverlight-compatible-code-Part-2-Dependecy-Properties" rev="vote-for"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdevblog.ailon.org%2Fdevblog%2Fpost%2F2009%2F11%2F05%2FWriting-WPFSilverlight-compatible-code-Part-2-Dependecy-Properties.aspx" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/cyZS2J0LTvU" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/cyZS2J0LTvU/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/11/05/Writing-WPFSilverlight-compatible-code-Part-2-Dependecy-Properties.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=d95645fa-e0e7-4877-a206-3c30449e6de7</guid>
      <pubDate>Thu, 05 Nov 2009 19:33:43 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=d95645fa-e0e7-4877-a206-3c30449e6de7</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=d95645fa-e0e7-4877-a206-3c30449e6de7</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/11/05/Writing-WPFSilverlight-compatible-code-Part-2-Dependecy-Properties.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=d95645fa-e0e7-4877-a206-3c30449e6de7</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=d95645fa-e0e7-4877-a206-3c30449e6de7</feedburner:origLink></item>
    <item>
      <title>Writing WPF/Silverlight compatible code. Table of Contents</title>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note for future readers&lt;/strong&gt;: These series discuss WPF and Silverlight versions that are current stable versions at the time of this writing – WPF 3.5 and Silverlight 3.&lt;/em&gt;&lt;/p&gt;  &lt;h2&gt;Table of Contents&lt;/h2&gt;  &lt;p&gt;These are ongoing series of posts on the subject of WPF/Silverlight compatibility. New posts will be added to this ToC as they are written so bookmark this post or just &lt;a href="http://feeds.feedburner.com/devblogailonorg"&gt;subscribe to my RSS feed&lt;/a&gt;.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://devblog.ailon.org/devblog/post/2009/11/02/Writing-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx"&gt;The Big Picture&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://devblog.ailon.org/devblog/post/2009/11/05/Writing-WPFSilverlight-compatible-code-Part-2-Dependecy-Properties.aspx"&gt;Dependency Properties&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;… more to come…&lt;/li&gt; &lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/bX_z1PpLrcE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/bX_z1PpLrcE/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/11/05/Writing-WPFSilverlight-compatible-code-Table-of-Contents.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=09879619-342e-4eaa-81da-2207e2a08fef</guid>
      <pubDate>Thu, 05 Nov 2009 17:25:29 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=09879619-342e-4eaa-81da-2207e2a08fef</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=09879619-342e-4eaa-81da-2207e2a08fef</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/11/05/Writing-WPFSilverlight-compatible-code-Table-of-Contents.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=09879619-342e-4eaa-81da-2207e2a08fef</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=09879619-342e-4eaa-81da-2207e2a08fef</feedburner:origLink></item>
    <item>
      <title>Writing WPF/Silverlight compatible code. Part 1: The Big Picture</title>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note for future readers&lt;/strong&gt;: These series discuss WPF and Silverlight versions that are current stable versions at the time of this writing – WPF 3.5 and Silverlight 3.&lt;/em&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;These are ongoing series of posts on the subject of WPF/Silverlight compatibility. New posts will be added to the &lt;a href="http://devblog.ailon.org/devblog/post/2009/11/05/Writing-WPFSilverlight-compatible-code-Table-of-Contents.aspx"&gt;Table of Contents post&lt;/a&gt; as they are written so bookmark that post or just &lt;a href="http://feeds.feedburner.com/devblogailonorg"&gt;subsribe to my RSS feed&lt;/a&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;h2&gt;Introduction&lt;/h2&gt;  &lt;p&gt;Silverlight is a subset of WPF. This is the short official version. In reality this might be close to true featurewise, but as developers of cross-platform (here and later in these series &amp;quot;platform&amp;quot; should mean WPF or Silverlight) solutions we care not only about what benefits some feature provides to the end user, but about it's API for us (developers) and quite often even about it's internal implementation.&lt;/p&gt;  &lt;p&gt;This is how it looks to me at this point (please excuse my artistic “skills”):&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="wpf_silverlight_theory" border="0" alt="wpf_silverlight_theory" src="http://devblog.ailon.org/devblog/image.axd?picture=wpf_silverlight_theory_1.png" width="500" height="730" /&gt; &lt;/p&gt;  &lt;p&gt;At the time of this writing I'm in the middle of converting of one of our &lt;a href="http://wpf.amcharts.com"&gt;WPF charting controls&lt;/a&gt; to WPF/Silverlight&amp;#160; compatible code. It took me more than a week of intense work just to get it to compile and display something under Silverlight and I have yet a lot to do before everything works as expected. During this journey I've been writing down all the differences I encounter and I'm going to share my findings, solutions and workarounds in these series. &lt;/p&gt;  &lt;p&gt;There's great high-level conceptual information on the differences in &lt;a href="http://msdn.microsoft.com/en-us/library/cc903925%28VS.95%29.aspx"&gt;Silverlight documentation&lt;/a&gt; and &lt;a href="http://wpfslguidance.codeplex.com/"&gt;Wintillect’s whitepaper&lt;/a&gt;, but it's often the details that cost (or save) you time and cause headaches. &lt;/p&gt;  &lt;h2&gt;The Approach &lt;/h2&gt;  &lt;p&gt;I assume that anyone reading this plans to develop a cross-platform application or control or at least wants to be prepared for the future. Such project could be approached in two ways:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Develop cross-platform project right from the start &lt;/li&gt;    &lt;li&gt;Develop for one platform and adopt for the other later. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Develop cross-platform project right from the start&lt;/strong&gt;     &lt;br /&gt;This is the way to go if your only concern is the quality of the end result. Unfortunately in real life quality is often offset by the other very important metric – time to market. It's hard to argue that one will see some real tangible results faster when concentrating all attention on one platform. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Develop for one platform and adopt for the other later      &lt;br /&gt;&lt;/strong&gt;As was said above you will most likely go this route. Here you have another 2 options: start from WPF or Silverlight. There might be some business, religious or other reasons to start from one or the other, but we will set all of these aside and look only on technical aspects.&lt;/p&gt;  &lt;p&gt;From my point of view life would be easier if you start with Silverlight and ease into WPF later. With that said it’s not necessary that easier equals better. You will most likely settle for lowest common denominator which could be minor problem in most cases but could mean a lot in some. I’ll post a separate part on one of the differences were taking a special route for WPF version could make a difference.&lt;/p&gt;  &lt;p&gt;If you start with WPF, however, you will most likely end-up doing quite some rewriting when time comes to step into Silverlight, but you wont have to break what’s working just to get a better performing WPF version (considering there’s a reason to care about performance in your project).&lt;/p&gt;  &lt;h2&gt;The Toolset&lt;/h2&gt;  &lt;p&gt;There are several methods to facilitate code reuse between Silverlight and WPF versions of your poject while handling the differences at the same time. Personally I use linked code files for common parts and two methods to tame the differences – preprocessor directives (where just a small portion of code differs) and partial classes (for serious differences).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Linked code files in Visual Studio&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To add a linked code file to your WPF or Silverlight project in Visual Studio you just go to Project –&amp;gt; “Add Existing Item…” navigate to your other (Silverlight or WPF) project directory, locate the file and use “Add As Link” item in the “Add” dropdown button.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=vs_add_as_link.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="vs_add_as_link" border="0" alt="vs_add_as_link" src="http://devblog.ailon.org/devblog/image.axd?picture=vs_add_as_link_thumb.png" width="442" height="301" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Preprocessor (compiler) directives&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When you have a small amount of code differing between the versions you can use &lt;a href="http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx"&gt;preprocessor directives&lt;/a&gt; to include one or the other chunk of code depending on the type of project being compiled. For your convinience Silverlight project template predefines “SILVERLIGHT” constant. You can define something shorter and more mistyping proof but I find it’s safer to go with this default (you never know when and how you are goint to reuse this code). Here’s how you go about this:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; TextBox _dataTextBox;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnApplyTemplate()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #cc6633"&gt;#if&lt;/span&gt; SILVERLIGHT&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     _dataTextBox = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.GetTemplateChild(&lt;span style="color: #006080"&gt;&amp;quot;PART_DataTextBox&amp;quot;&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; TextBox;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #cc6633"&gt;#else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     _dataTextBox = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Template.FindName(&lt;span style="color: #006080"&gt;&amp;quot;PART_DataTextBox&amp;quot;&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; TextBox;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color: #cc6633"&gt;#endif&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Partial classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While preprocessor directives are ok for ducttaping small differences, the code becomes quite difficult to digest pretty quickly. Enter &lt;a href="http://msdn.microsoft.com/en-us/library/wa80x488.aspx"&gt;partial classes&lt;/a&gt;. You define common code in one partial class file and link that file from one project to the other. Then you create a separate partical class files for methods that differ in each project.&lt;/p&gt;

&lt;p&gt;Here’s how a simplistic Visual Studio solution implementing this approach looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=vs_partial_classes.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="vs_partial_classes" border="0" alt="vs_partial_classes" src="http://devblog.ailon.org/devblog/image.axd?picture=vs_partial_classes_thumb.png" width="263" height="250" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;MyControlWPF is a WPF project. It contains MyControl.cs file which contains a partial MyControl class. That file contains code that is identical for both WPF and Silverlight. It is added to MyControlSL (our Silverlight project) as link. So there’s only one copy of this file to maintain and it’s used in both projects. MyControl.WPF.cs and MyControl.SL.cs on the other hand contain members of MyControl that differ in implementation between WPF and Silverlight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What about XAML?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Unfortunatelly there’s no standard way to use preprocessor directives or something like that to isolate the differences. There are some &lt;a href="http://blogs.msdn.com/blemmon/archive/2009/04/29/using-the-preprocessor-to-share-incompatible-xaml-between-sl-and-wpf-part-1.aspx"&gt;custom hacks&lt;/a&gt; however. While this is definitely cool from enthusiasts point of view or when you have really large XAML files to maintain, I think it’s easier to simply handle 2 files where differences are unavoidable. So you either make your XAML work for both WPF and Silverlight and link that XAML file from one project or you maintain 2 different files.&lt;/p&gt;

&lt;p&gt;That’s it for part 1. Starting with the the next part I’ll show the differences I’ve stumbled upon and a ways to solve or workaround them. Stay tuned…&lt;/p&gt;
&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://devblog.ailon.org/devblog/post/2009/11/02/Writing-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx&amp;amp;title=Writing WPF/Silverlight compatible code. Part 1: The Big Picture"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://devblog.ailon.org/devblog/post/2009/11/02/Writing-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt; &lt;a href="http://dotnetshoutout.com/Writing-WPFSilverlight-compatible-code-Part-1" rev="vote-for"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdevblog.ailon.org%2Fdevblog%2Fpost%2F2009%2F11%2F02%2FWriting-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/M2LAu620yN4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/M2LAu620yN4/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/11/02/Writing-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=39705c52-1425-4b9e-a635-b546e45ea96a</guid>
      <pubDate>Mon, 02 Nov 2009 11:53:59 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=39705c52-1425-4b9e-a635-b546e45ea96a</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=39705c52-1425-4b9e-a635-b546e45ea96a</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/11/02/Writing-WPFSilverlight-compatible-code-Part-1-The-Big-Picture.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=39705c52-1425-4b9e-a635-b546e45ea96a</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=39705c52-1425-4b9e-a635-b546e45ea96a</feedburner:origLink></item>
    <item>
      <title>Stock Chart 1.0 Final</title>
      <description>&lt;p&gt;&lt;img title="DataSet comparison in Stock Chart" alt="DataSet comparison in Stock Chart" src="http://wpf.amcharts.com/lib/screenshots/stockcompare500.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;We have released final 1.0 version of the &lt;a href="http://wpf.amcharts.com/stock"&gt;amCharts Stock Chart for WPF&lt;/a&gt;. Thanks to everyone who helps us spread the word!&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwpf.amcharts.com%2fnews%2fstock-chart-for-wpf-released"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwpf.amcharts.com%2fnews%2fstock-chart-for-wpf-released" /&gt;&lt;/a&gt; &lt;a href="http://dotnetshoutout.com/amCharts-Stock-Chart-for-WPF-Financial-Charting-Control-for-WPF" rev="vote-for"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fwpf.amcharts.com%2Fnews%2Fstock-chart-for-wpf-released" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/EzIC7OXKOJ4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/EzIC7OXKOJ4/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/10/20/Stock-Chart-10-Final.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=4e0c0162-f21f-44d7-b2f2-d7d81f155d57</guid>
      <pubDate>Tue, 20 Oct 2009 13:34:44 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=4e0c0162-f21f-44d7-b2f2-d7d81f155d57</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=4e0c0162-f21f-44d7-b2f2-d7d81f155d57</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/10/20/Stock-Chart-10-Final.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=4e0c0162-f21f-44d7-b2f2-d7d81f155d57</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=4e0c0162-f21f-44d7-b2f2-d7d81f155d57</feedburner:origLink></item>
    <item>
      <title>Oh, The Dramz: Mozilla blocks WPF</title>
      <description>&lt;p&gt;As someone who has been unpleasantly (but not critically) &lt;a href="http://wpf.amcharts.com/demo"&gt;affected&lt;/a&gt; by the drama that ensued during the weekend after Mozilla’s decision to forcefully block .NET Assistant add-on and WPF plug-in on ALL Windows/Firefox installations around the world, I’ve been following a &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=522777"&gt;Bugzilla thread&lt;/a&gt; on the subject. Quite a fascinating reading.&lt;/p&gt;  &lt;p&gt;A &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=522777#c108"&gt;comment from Peter Schaefer&lt;/a&gt; perefectly summarizes how I feel about this unfortunate situation:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;As understand the issue, Mozilla could have used its blocklist mechanism right if Microsoft had been smart enough to update the version number or name of the installed plugins along with their security patch. A solution would be to do this now and thus make the functionality work again for those who want it. &lt;/p&gt;    &lt;p&gt;If you want to assign blame, which doesn't help anyone, Microsoft first messed things up, but now when trying to fix it both Mozilla and Microsoft have made suboptimal decisions, IMO. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;As I see it the only reasonable way to resolve this satisfatorily and ASAP (which is really needed in the world utilizing affected technologies) is for Microsoft to release a dummy WPF plugin update with an updated version number that wouldn’t install on unpatched Windows and for Mozilla to unblock that version and leave the old one blocked.&lt;/p&gt;  &lt;p&gt;I can only imagine what admins and helpdesks of affected companies are going through Today. My deepest condolences to you guys.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: the block on .NET Assistant (ClickOnce enabling add-on) has been removed on Sunday, so the problem is partially resolved. However WPF in-browser (XBAP) apps are still affected.&lt;/p&gt;  &lt;p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://devblog.ailon.org/devblog/post/2009/10/Oh2c-The-Dramz-Mozilla-blocks-WPF.aspx&amp;amp;title=Oh, The Dramz: Mozilla blocks WPF"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://devblog.ailon.org/devblog/post/2009/10/Oh2c-The-Dramz-Mozilla-blocks-WPF.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/9yBxuW4Id9o" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/9yBxuW4Id9o/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/10/19/Oh2c-The-Dramz-Mozilla-blocks-WPF.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=52495bc8-a73f-44ab-84ee-ba4ca66bcf4a</guid>
      <pubDate>Mon, 19 Oct 2009 08:52:31 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=52495bc8-a73f-44ab-84ee-ba4ca66bcf4a</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=52495bc8-a73f-44ab-84ee-ba4ca66bcf4a</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/10/19/Oh2c-The-Dramz-Mozilla-blocks-WPF.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=52495bc8-a73f-44ab-84ee-ba4ca66bcf4a</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=52495bc8-a73f-44ab-84ee-ba4ca66bcf4a</feedburner:origLink></item>
    <item>
      <title>Stock Chart for WPF</title>
      <description>&lt;p&gt;&lt;img title="WPF Stock Chart" alt="WPF Stock Chart" src="http://wpf.amcharts.com/lib/screenshots/stockmultigraph500.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;We’ve published a release candidate of &lt;a href="http://wpf.amcharts.com/stock"&gt;amCharts Stock Chart for WPF&lt;/a&gt;. Stock Chart’s main purpose is visualization of financial data but it’s suitable and very efficent at displaying any date/time based data. It’s free under linkware license even for commercial use.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wpf.amcharts.com/demo"&gt;Check out Stock Chart for WPF demo&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wpf.amcharts.com/download"&gt;Download amCharts Stock Chart for WPF&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Btw, through the month of October 2009 we are running a &lt;strong&gt;50% discount&lt;/strong&gt; on Stock Chart licenses. &lt;a href="http://wpf.amcharts.com/buy"&gt;Click here for details&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/cCHQnh_oDaY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/cCHQnh_oDaY/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/10/12/stock-chart-for-wpf-release-candidate-and-new-demos.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=1006e31f-d4c7-478e-9405-8c3d028df0cc</guid>
      <pubDate>Mon, 12 Oct 2009 11:37:39 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=1006e31f-d4c7-478e-9405-8c3d028df0cc</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=1006e31f-d4c7-478e-9405-8c3d028df0cc</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/10/12/stock-chart-for-wpf-release-candidate-and-new-demos.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=1006e31f-d4c7-478e-9405-8c3d028df0cc</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=1006e31f-d4c7-478e-9405-8c3d028df0cc</feedburner:origLink></item>
    <item>
      <title>amCharts for WPF with Scatter &amp;amp; Bubble Chart Support</title>
      <description>&lt;p&gt;&lt;img title="bubble chart for WPF" alt="bubble chart for WPF" src="http://wpf.amcharts.com/lib/screenshots/xydemo500.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;We’ve released a new version of &lt;a href="http://wpf.amcharts.com/xy/"&gt;amCharts for WPF&lt;/a&gt; with support for &lt;a href="http://wpf.amcharts.com/xy/"&gt;Scatter (XY) &amp;amp; Bubble charting&lt;/a&gt;. Check it out and help us spread the word. Thanks!&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwpf.amcharts.com%2fnews%2fscatter-bubble-chart-for-wpf-released"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwpf.amcharts.com%2fnews%2fscatter-bubble-chart-for-wpf-released" /&gt;&lt;/a&gt; &lt;a href="http://dotnetshoutout.com/Scatter-Bubble-Chart-Control-for-WPF" rev="vote-for"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fwpf.amcharts.com%2Fnews%2Fscatter-bubble-chart-for-wpf-released" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/YWxYhFi2aYo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/YWxYhFi2aYo/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/07/10/amCharts-for-WPF-with-Scatter-amp3b-Bubble-Chart-Support.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=4e910a52-c489-417a-9e97-44f1f60bce36</guid>
      <pubDate>Fri, 10 Jul 2009 09:16:27 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=4e910a52-c489-417a-9e97-44f1f60bce36</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=4e910a52-c489-417a-9e97-44f1f60bce36</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/07/10/amCharts-for-WPF-with-Scatter-amp3b-Bubble-Chart-Support.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=4e910a52-c489-417a-9e97-44f1f60bce36</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=4e910a52-c489-417a-9e97-44f1f60bce36</feedburner:origLink></item>
    <item>
      <title>Creating Gapped and Bulleted Shapes in WPF/Silverlight</title>
      <description>&lt;p&gt;&lt;img src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/Downloads_D3C9/bulletedpath_3.png" /&gt; &lt;/p&gt;  &lt;p&gt;I’ve released a small control for creating bulleted paths in WPF. You can get it in &lt;a href="http://devblog.ailon.org/devblog/page/Downloads.aspx"&gt;download section&lt;/a&gt; of this blog. The main trick used in this control is described in my article titled “&lt;a href="http://www.dev102.com/2009/05/25/creating-gapped-and-bulleted-shapes-in-wpfsilverlight/"&gt;Creating Gapped and Bulleted Shapes in WPF/Silverlight&lt;/a&gt;” and published by &lt;a href="http://dev102.com/"&gt;dev102.com&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/vg_K7SRzNmM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/vg_K7SRzNmM/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/05/26/Creating-Gapped-and-Bulleted-Shapes-in-WPFSilverlight.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=f9306bb8-af4f-49bc-9fe8-a2bb3653b15d</guid>
      <pubDate>Tue, 26 May 2009 10:08:37 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=f9306bb8-af4f-49bc-9fe8-a2bb3653b15d</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=f9306bb8-af4f-49bc-9fe8-a2bb3653b15d</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/05/26/Creating-Gapped-and-Bulleted-Shapes-in-WPFSilverlight.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=f9306bb8-af4f-49bc-9fe8-a2bb3653b15d</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=f9306bb8-af4f-49bc-9fe8-a2bb3653b15d</feedburner:origLink></item>
    <item>
      <title>Name scopes within templates are not supported</title>
      <description>&lt;p&gt;I’ve got an &lt;a href="http://wpf.amcharts.com/forum/viewtopic.php?id=18"&gt;issue&lt;/a&gt; reported on &lt;a href="http://wpf.amcharts.com/"&gt;amCharts for WPF&lt;/a&gt; forum suggesting that it’s impossible to use the charts in DataTemplate. I’ve verified that it was true and exception message reads as follows:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;NameScopeProperty found within the content of a FrameworkTemplate, on a 'AmCharts.Windows.LineChart' object. Name scopes within templates are not supported.&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The exception was caused by the call to SetNameSpace method in the constructor of the chart base class:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;NameScope&lt;/span&gt;.SetNameScope(&lt;span style="color: blue"&gt;this&lt;/span&gt;, &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;NameScope&lt;/span&gt;());&lt;/pre&gt;

&lt;p&gt;I’ve re-read &lt;a href="http://msdn.microsoft.com/en-us/library/ms746659.aspx"&gt;documentation on name scopes&lt;/a&gt; and made an assumption that I have to find a way to use template’s own name scope to register my names with it and…&amp;#160; spent almost a day trying to figure out how to do it universally.&lt;/p&gt;

&lt;p&gt;Finally I gave up on that branch of thought and decided to try something else. To my surprise the problem was solved by simply moving the same call to SetNameScope() from constructor to a place right before it is needed. Namely where I make the first call to RegisterName() which happens after my controls have been loaded, templates applied, etc.&lt;/p&gt;

&lt;p&gt;Now I’m not completely sure why this worked but my understanding is that if you do it in the constructor SetNameScope() get’s called in the context of the Template (producing an exception above) and when it is called later it’s already in context of the control to which the Template is applied. Please, correct me if I’m wrong.&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://devblog.ailon.org/devblog/post/2009/05/Name-scopes-within-templates-are-not-supported.aspx&amp;amp;title=Name scopes within templates are not supported"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://devblog.ailon.org/devblog/post/2009/05/Name-scopes-within-templates-are-not-supported.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;
&lt;a rev="vote-for" href="http://dotnetshoutout.com/Name-scopes-within-templates-are-not-supported"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fdevblog.ailon.org%2Fdevblog%2Fpost%2F2009%2F05%2FName-scopes-within-templates-are-not-supported.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/0t8qqEzYNqs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/0t8qqEzYNqs/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/05/08/Name-scopes-within-templates-are-not-supported.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=f26d79c7-e658-441e-99bf-e992c7306528</guid>
      <pubDate>Fri, 08 May 2009 15:03:59 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=f26d79c7-e658-441e-99bf-e992c7306528</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=f26d79c7-e658-441e-99bf-e992c7306528</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/05/08/Name-scopes-within-templates-are-not-supported.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=f26d79c7-e658-441e-99bf-e992c7306528</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=f26d79c7-e658-441e-99bf-e992c7306528</feedburner:origLink></item>
    <item>
      <title>4 Tips for WPF Control Developers</title>
      <description>&lt;p&gt;Dev102.com has published my article titled &lt;a title="4 Great Tips for Custom WPF Controls Developers" href="http://www.dev102.com/2009/05/04/4-grea-tips-for-custom-wpf-controls-developers/"&gt;4 Great Tips for Custom WPF Controls Developers&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Bonus tip:&lt;/strong&gt; there’s a 50% discount coupon for &lt;a href="http://wpf.amcharts.com/"&gt;amCharts for WPF&lt;/a&gt; at the end of that article ;)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/WpHQlcXqamM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/WpHQlcXqamM/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/05/05/4-Tips-for-WPF-Control-Developers.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=a547153a-7a45-4e04-a134-96a7e24d263e</guid>
      <pubDate>Tue, 05 May 2009 09:52:22 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=a547153a-7a45-4e04-a134-96a7e24d263e</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=a547153a-7a45-4e04-a134-96a7e24d263e</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/05/05/4-Tips-for-WPF-Control-Developers.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=a547153a-7a45-4e04-a134-96a7e24d263e</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=a547153a-7a45-4e04-a134-96a7e24d263e</feedburner:origLink></item>
    <item>
      <title>Book Review: Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition by Matthew MacDonald</title>
      <description>&lt;p&gt;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/BookRev.5SecondEditionbyMatthewMacDonald_BD10/prowpf_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px 5px; display: inline; border-top: 0px; border-right: 0px" title="prowpf" border="0" alt="prowpf" align="right" src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/BookRev.5SecondEditionbyMatthewMacDonald_BD10/prowpf_thumb.png" width="120" height="159" /&gt;&lt;/a&gt; After a pretty bland and unexciting ASP.NET book this was a very good change. Matthew MacDonald covers all aspects of WPF in a very good and interesting style. All the basics are covered, principles explained and practical advices are given.&lt;/p&gt;  &lt;p&gt;Probably my only but pretty serious complaint is about a Chapter 24 - Custom Elements. This was one of the main chapters (aside from basic WPF principles) why I bought this book in the first place. I was developing our &lt;a href="http://wpf.amcharts.com/"&gt;WPF charting controls&lt;/a&gt; and expected to find some insights and guidance in this chapter. Unfortunately a big chunk of the chapter (which is not so long to start with) was dedicated to explaining logical implications of building a masked text box. Probably quite interesting stuff on it’s own but not directly related to what it takes to build custom WPF elements in general.&lt;/p&gt;  &lt;p&gt;Aside from that I’m very satisfied with this book and can highly recommend it to any .NET/C# developer interested in programming for Windows Presentation Foundation.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Verdict: close to perfect&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/1590599551?ie=UTF8&amp;amp;tag=ailosdeveblog-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1590599551"&gt;Buy this book on Amazon&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/Zx3NRYsFICM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/Zx3NRYsFICM/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/04/29/Book-Review-Pro-WPF-in-C-2008-Windows-Presentation-Foundation-with-NET-352c-Second-Edition-by-Matthew-MacDonald.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=8368f80c-161f-4898-95eb-de8cc894ff4c</guid>
      <pubDate>Wed, 29 Apr 2009 13:42:00 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=8368f80c-161f-4898-95eb-de8cc894ff4c</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=8368f80c-161f-4898-95eb-de8cc894ff4c</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/04/29/Book-Review-Pro-WPF-in-C-2008-Windows-Presentation-Foundation-with-NET-352c-Second-Edition-by-Matthew-MacDonald.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=8368f80c-161f-4898-95eb-de8cc894ff4c</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=8368f80c-161f-4898-95eb-de8cc894ff4c</feedburner:origLink></item>
    <item>
      <title>amCharts for WPF 1.0 released</title>
      <description>&lt;img border="0" alt="Pie chart, Column chart, Line chart, Mixed column and line chart" src="http://wpf.amcharts.com/lib/screenshots/frontpagemix.png" width="500" height="332" /&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;We have &lt;a href="http://wpf.amcharts.com/news/amcharts-for-wpf-10-released"&gt;just released&lt;/a&gt; the final 1.0 version of &lt;a href="http://wpf.amcharts.com/"&gt;our charts for WPF&lt;/a&gt;. Hooray!&lt;/p&gt;  &lt;p&gt;Please, help me spread the word by &lt;a href="http://www.dotnetkicks.com/wpf/amCharts_release_WPF_edition_of_their_charting_bundle"&gt;kicking&lt;/a&gt;, &lt;a href="http://dotnetshoutout.com/amCharts-amCharts-fo-WPF-news-and-announcements"&gt;shouting&lt;/a&gt;, &lt;a href="http://www.dzone.com/links/amcharts_release_wpf_edition_of_their_charting_bu.html"&gt;dzoning&lt;/a&gt;, cross-posting and otherwise promoting the release. Thanks a million!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/edS-yEHoh_0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/edS-yEHoh_0/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/04/27/amCharts-for-WPF-10-released.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=411d3bd5-56a7-4439-ba9e-274b118f16fd</guid>
      <pubDate>Mon, 27 Apr 2009 10:49:00 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=411d3bd5-56a7-4439-ba9e-274b118f16fd</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=411d3bd5-56a7-4439-ba9e-274b118f16fd</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/04/27/amCharts-for-WPF-10-released.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=411d3bd5-56a7-4439-ba9e-274b118f16fd</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=411d3bd5-56a7-4439-ba9e-274b118f16fd</feedburner:origLink></item>
    <item>
      <title>Book Review: Professional ASP.NET 3.5: In C# and VB</title>
      <description>&lt;p&gt;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/69485a75a1c7_DCDC/proaspnet_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px 5px; display: inline; border-top: 0px; border-right: 0px" title="proaspnet" border="0" alt="proaspnet" align="right" src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/69485a75a1c7_DCDC/proaspnet_thumb.jpg" width="100" height="125" /&gt;&lt;/a&gt; About a year ago I bought &lt;a href="http://www.amazon.com/gp/product/0470187573?ie=UTF8&amp;amp;tag=ailosdeveblog-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0470187573"&gt;this book&lt;/a&gt; when &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/a&gt; promoted a deal on it at Amazon. This was probably the biggest technology book I’ve ever read and it took me months to read and not only because of the size but because it was boooring.&lt;/p&gt;  &lt;p&gt;Most of the book is written by Bill Evjen (as far as I understand) and his chapters are very dry and not very different from just browsing through MSDN documentation. There are almost no personal opinions, recommendations or anything. Just plain reference.&lt;/p&gt;  &lt;p&gt;Some chapters are written by &lt;a href="http://www.hanselman.com/"&gt;Scott Hanselman&lt;/a&gt; and you can see it right from the start. These chapters offer opinions, advices and you can see a person behind them. I don’t know, maybe it’s just me, but I prefer seeing a person behind a book or an article rather than reading a book which looks like it’s written by some technical documentation team. Unfortunately only a few chapters are authored by Scott.&lt;/p&gt;  &lt;p&gt;I couldn’t identify chapters by Devin Rader so he either writes indistinguishably from Bill or Scott :)&lt;/p&gt;  &lt;p&gt;The other point to criticize would be the fact that book has samples in both C# and VB. I understand that it’s easier to publish one book instead of two but the book could’ve been like 20-30% thinner and lighter and I wouldn’t have to decide against bringing it with me on the flight (yes, it’s that heavy). And, you know, 300-400 useless pages for almost every reader (either VB or C# developers) doesn’t help preserve Amazonia forests.&lt;/p&gt;  &lt;p&gt;Overall this is not a bad book if you are looking for printed ASP.NET reference but not quite a good read if you want some insight, recommendations and depth.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Verdict: complete but dry and boring.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Other recommended books about ASP.NET&lt;/em&gt;: 4 years ago I’ve read &lt;a href="http://www.amazon.com/gp/product/0735621772?ie=UTF8&amp;amp;tag=ailosdeveblog-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0735621772"&gt;Programming Microsoft ASP.NET 2.0 Applications: Advanced Topics&lt;/a&gt; by Dino Esposito and it was really good. Unfortunately it doesn’t seem that there’s an updated edition of this book by Dino, but there’s other book called &lt;a href="http://www.amazon.com/gp/product/0735625271?ie=UTF8&amp;amp;tag=ailosdeveblog-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0735625271"&gt;Programming Microsoft ASP.NET 3.5&lt;/a&gt;. I’m not sure how this new book is related to the older ones (in terms of topics) but I really like Dino Esposito’s style and depth of his books.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/ofgDRHJ9wGo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/ofgDRHJ9wGo/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/04/24/Book-Review-Professional-ASPNET-35-In-C-and-VB.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=b30775a3-be20-4954-a492-dd645378e4d3</guid>
      <pubDate>Fri, 24 Apr 2009 16:29:00 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=b30775a3-be20-4954-a492-dd645378e4d3</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=b30775a3-be20-4954-a492-dd645378e4d3</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/04/24/Book-Review-Professional-ASPNET-35-In-C-and-VB.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=b30775a3-be20-4954-a492-dd645378e4d3</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=b30775a3-be20-4954-a492-dd645378e4d3</feedburner:origLink></item>
    <item>
      <title>Merging SVN branch back to trunk with TortoiseSVN</title>
      <description>&lt;p&gt;This post is mostly a note to self, cause if I don’t do this for some time I forget how to do it and spend quite some time figuring things out. Actually this is quite a simple task but awkwardly implemented (from my point of view). &lt;/p&gt;  &lt;p&gt;Now I did it for a second time in 2 weeks and managed to merge my branch back to trunk from the first attempt, so I decided it’s good ocassion to write things down so I don’t waste time the next time I forget the procedure.&lt;/p&gt;  &lt;p&gt;So, here’s what you do after you are finished working on your branch and want to merge everything back to trunk:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Make sure you’ve commited everything to your branch.&lt;/li&gt;    &lt;li&gt;Backup your whole working copy (just in case :)&lt;/li&gt;    &lt;li&gt;Switch your working copy to trunk: Right click-&amp;gt;TortoiseSVN-&amp;gt;Switch. Select your trunk URL, HEAD revision and press OK.&lt;/li&gt;    &lt;li&gt;Merge (this is the awkward part): Right click-&amp;gt;TortoiseSVN-&amp;gt;Merge. In from box select URL of your &lt;strong&gt;trunk&lt;/strong&gt; (HEAD revision), uncheck Use “From:” checkbox in To section and select &lt;strong&gt;branch&lt;/strong&gt; URL in To box. Test wit “Dry run” and press “Merge” if everything is correct.&lt;/li&gt;    &lt;li&gt;Commit to trunk&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;That’s it.&lt;/p&gt;  &lt;p&gt;Bonus track: &lt;a href="http://blog.eleutian.com/2008/04/02/HowToBranchProperly.aspx"&gt;here’s a good article&lt;/a&gt; on minimizing merging conflicts when working on branches.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/1T18TVJuqgo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/1T18TVJuqgo/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/03/31/Merging-SVN-branch-back-to-trunk-with-TortoiseSVN.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=06627327-d402-48ba-bc1d-5b0665990936</guid>
      <pubDate>Tue, 31 Mar 2009 16:38:35 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=06627327-d402-48ba-bc1d-5b0665990936</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=06627327-d402-48ba-bc1d-5b0665990936</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/03/31/Merging-SVN-branch-back-to-trunk-with-TortoiseSVN.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=06627327-d402-48ba-bc1d-5b0665990936</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=06627327-d402-48ba-bc1d-5b0665990936</feedburner:origLink></item>
    <item>
      <title>amCharts for WPF 1.0 Beta</title>
      <description>&lt;p&gt;&amp;#160;&lt;img title="100% stacked WPF column chart" alt="100% stacked WPF column chart" src="http://wpf.amcharts.com/lib/screenshots/columndemo450.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;Just released the 1.0 Beta version of our &lt;a href="http://wpf.amcharts.com/"&gt;WPF charts&lt;/a&gt; bundle. Added support for &lt;a href="http://wpf.amcharts.com/column"&gt;column &amp;amp; bar charts&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/WDrqktoriuM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/WDrqktoriuM/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/03/30/amcharts-for-wpf-10-beta-released.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=ae05cb12-8ed2-42c6-a80a-7279fd9e8eda</guid>
      <pubDate>Mon, 30 Mar 2009 16:33:50 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=ae05cb12-8ed2-42c6-a80a-7279fd9e8eda</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=ae05cb12-8ed2-42c6-a80a-7279fd9e8eda</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/03/30/amcharts-for-wpf-10-beta-released.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=ae05cb12-8ed2-42c6-a80a-7279fd9e8eda</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=ae05cb12-8ed2-42c6-a80a-7279fd9e8eda</feedburner:origLink></item>
    <item>
      <title>amCharts for WPF: Line &amp;amp; Area Chart Released</title>
      <description>&lt;p&gt;Just released &lt;a href="http://wpf.amcharts.com/"&gt;Line and Area charts for WPF&lt;/a&gt;. The announcement is &lt;a href="http://wpf.amcharts.com/news/line-area-chart-released"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a title="Line and Area charts for WPF" href="http://wpf.amcharts.com/"&gt;&lt;img title="amCharts WPF Line and Area charts" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="295" alt="amCharts WPF Line and Area charts" src="http://wpf.amcharts.com/lib/screenshots/linedemo450.jpg" width="450" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Enjoy. And help us spread the word if you do!&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwpf.amcharts.com%2fnews%2fline-area-chart-released"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwpf.amcharts.com%2fnews%2fline-area-chart-released" border="0" /&gt;&lt;/a&gt; &lt;a href="http://dotnetshoutout.com/Line-and-Area-Charts-added-to-amCharts-for-WPF" rev="vote-for"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fwpf.amcharts.com%2Fnews%2Fline-area-chart-released" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/GDDQAZMMWq0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/GDDQAZMMWq0/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/03/13/line-area-chart-released.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=fdbca6b2-edda-46ec-83e2-32a2ab69b654</guid>
      <pubDate>Fri, 13 Mar 2009 12:53:44 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=fdbca6b2-edda-46ec-83e2-32a2ab69b654</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=fdbca6b2-edda-46ec-83e2-32a2ab69b654</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/03/13/line-area-chart-released.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=fdbca6b2-edda-46ec-83e2-32a2ab69b654</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=fdbca6b2-edda-46ec-83e2-32a2ab69b654</feedburner:origLink></item>
    <item>
      <title>Charts for WPF</title>
      <description>&lt;p&gt;I haven’t posted anything significant here for quite some time. That’s not because I’m lazy (that too), but because I’ve been busy working on &lt;a href="http://wpf.amcharts.com/"&gt;WPF edition&lt;/a&gt; of &lt;a href="http://www.amcharts.com/"&gt;amCharts&lt;/a&gt;. For those who don’t know, amCharts is one of the leading charting controls for web developed with Adobe Flash, and I’ve been working on &lt;a href="http://wpf.amcharts.com/"&gt;charts for WPF&lt;/a&gt; based on the know-how gathered in 2 years amCharts been out.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wpf.amcharts.com/"&gt;&lt;img title="WPF charts" height="313" alt="WPF charts" src="http://wpf.amcharts.com/lib/screenshots/demo500.jpg" width="500" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Overall working with WPF was quite a pleasant change of scenery. There were some rought edges and you really have to turn your head around if you’ve only been dealing with web and/or Windows Forms before. But after some time you get used to it and it’s really amazing what you can do with it.&lt;/p&gt;  &lt;p&gt;So, if you are developing for Windows Presentation Foundation platform or plan too and you need a really flexible and powerful charting solution, take a look at &lt;a href="http://wpf.amcharts.com/"&gt;amCharts for WPF&lt;/a&gt;. And, btw, you can use it absolutely free even in commercial applications as long as you don’t mind a small link back to amCharts in the corner. Or you can purchase a commercial (link-free) license which are going with 75% discount for now.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/vEQBY2UF2mg" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/vEQBY2UF2mg/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2009/02/18/Charts-for-WPF.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=77d1ad26-8a36-42f5-9fdd-620d139b68bf</guid>
      <pubDate>Wed, 18 Feb 2009 16:29:05 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=77d1ad26-8a36-42f5-9fdd-620d139b68bf</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=77d1ad26-8a36-42f5-9fdd-620d139b68bf</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2009/02/18/Charts-for-WPF.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=77d1ad26-8a36-42f5-9fdd-620d139b68bf</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=77d1ad26-8a36-42f5-9fdd-620d139b68bf</feedburner:origLink></item>
    <item>
      <title>Html.ActionLink for images in ASP.NET MVC</title>
      <description>&lt;p&gt;
As far as I understand there will be some methods in the future versions of ASP.NET MVC to get the same raw URL that is generated by Html.ActionLink helper method so you can wrap an image (or whatever) with a link, but in the current release (Beta) there&amp;#39;s no such thing. 
&lt;/p&gt;
&lt;p&gt;
A quick google search revealed different ways people deal with this but first results weren&amp;#39;t about the simplest workaround I just used and it works for me. So, I thought that someone might find this useful too.
&lt;/p&gt;
&lt;p&gt;
The simple idea is just to place a marker as a link text and then just use simple string.Replace to place an image in place of the marker. Something like this:
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;span style="background: #ffee62"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: blue"&gt;= &lt;/span&gt;Html.ActionLink(&lt;span style="color: #a31515"&gt;&amp;quot;__IMAGE_PLACEHOLDER__&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;Products&amp;quot;&lt;/span&gt;).Replace(&lt;span style="color: #a31515"&gt;&amp;quot;__IMAGE_PLACEHOLDER__&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;&amp;lt;img src=\&amp;quot;&amp;quot; &lt;/span&gt;+ myImgUrl + &lt;span style="color: #a31515"&gt;&amp;quot;\&amp;quot; /&amp;gt;&amp;quot;&lt;/span&gt;)&lt;span style="background: #ffee62"&gt;%&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;
Sure, this is not a very elegant solution but it works for me and it&amp;#39;s simple.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update: &lt;/strong&gt;Oops. It appears that I wasn&amp;#39;t aware of UrlHelper class and it&amp;#39;s Action method which does just that (returns Action url). Thanks to James for pointing this out in the comments.
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/7XUXWABNjCY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/7XUXWABNjCY/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/12/27/HtmlActionLink-for-images-in-ASPNET-MVC.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=31648662-85d7-4537-b9d9-61ae6f676d7e</guid>
      <pubDate>Sat, 27 Dec 2008 13:35:00 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=31648662-85d7-4537-b9d9-61ae6f676d7e</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=31648662-85d7-4537-b9d9-61ae6f676d7e</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/12/27/HtmlActionLink-for-images-in-ASPNET-MVC.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=31648662-85d7-4537-b9d9-61ae6f676d7e</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=31648662-85d7-4537-b9d9-61ae6f676d7e</feedburner:origLink></item>
    <item>
      <title>SPAW Editor v.2.0.8 and Flash Uploader</title>
      <description>&lt;p&gt;We (&lt;a href="http://www.solmetra.com"&gt;Solmetra&lt;/a&gt;) have released a new version of &lt;a href="http://spaweditor.com/en/disp.php/en_products/en_spaw/en_spaw_intro"&gt;SPAW Editor&lt;/a&gt; for both PHP and .NET. Download links &lt;a href="http://spaweditor.com/en/disp.php/en_products/en_spaw/en_spaw_download"&gt;here&lt;/a&gt;. More info &lt;a href="http://blog.solmetra.com/2008/08/29/spaw-editor-v208-released/"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;In other news we've released a new product aimed at web developers — &lt;a href="http://www.solmetra.com/uploader/"&gt;Flash Uploader&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/SPAWEditorv.2.0.8andFlashUploader_CAFC/uploader_shot_2.png"&gt;&lt;img height="242" alt="uploader_shot" src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/SPAWEditorv.2.0.8andFlashUploader_CAFC/uploader_shot_thumb.png" width="418" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;It’s a highly customizable Flash-based control that replaces stagnant HTML’s &amp;lt;input type="file"&amp;gt; tag. It not only displays neat progress bar — a feature lacking in &amp;lt;input type="file"&amp;gt; tag — but also provides some pretty neat upload security features and client-side restrictions (i.e. file size and type) as well as JavaScript API. &lt;p&gt;&lt;a href="http://www.solmetra.com/uploader/"&gt;Give it a try&lt;/a&gt; and let us know what you think. Oh, and it’s free!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/ZmpQZBG7aAA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/ZmpQZBG7aAA/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/08/29/SPAW-Editor-v208-and-Flash-Uploader.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=530fa7ff-9ab1-435d-a27f-9c1c08550872</guid>
      <pubDate>Fri, 29 Aug 2008 14:29:10 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=530fa7ff-9ab1-435d-a27f-9c1c08550872</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=530fa7ff-9ab1-435d-a27f-9c1c08550872</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/08/29/SPAW-Editor-v208-and-Flash-Uploader.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=530fa7ff-9ab1-435d-a27f-9c1c08550872</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=530fa7ff-9ab1-435d-a27f-9c1c08550872</feedburner:origLink></item>
    <item>
      <title>Add Interactive Flash Charts to Your ASP.NET Web Application. Part 4: Column Chart from Code-behind</title>
      <description>&lt;p&gt;&lt;em&gt;This is the fourth part in the series of tutorials showing how to add dynamic, interactive, data-driven charts to your ASP.NET web applications. These tutorials use &lt;/em&gt;&lt;a href="http://www.amcharts.com/"&gt;&lt;em&gt;amCharts&lt;/em&gt;&lt;/a&gt;&lt;em&gt; Flash charting components and "&lt;/em&gt;&lt;a href="http://www.amcharts.com/aspnet"&gt;&lt;em&gt;ASP.NET Controls for amCharts&lt;/em&gt;&lt;/a&gt;&lt;em&gt;" for ASP.NET integration.&lt;/em&gt; &lt;p&gt;This part is long overdue. Sorry for that. A tutorial on adding amCharts to ASP.NET page from code-behind was the most requested on &lt;a href="http://www.amcharts.com/forum/viewforum.php?id=16"&gt;amCharts ASP.NET controls forum&lt;/a&gt;. So, here we go. &lt;p&gt;Make sure you have your environment setup, &lt;a href="http://amcharts.com/aspnet/"&gt;ASP.NET controls for amCharts&lt;/a&gt; DLL added and &lt;a href="http://amcharts.com/column/"&gt;amCharts Column chart&lt;/a&gt; added to your project. Details on doing that were provided in &lt;a href="http://devblog.ailon.org/devblog/post/2008/03/Add-Interactive-Flash-Charts-to-Your-ASPNET-Web-Application-Part1-Basics.aspx"&gt;Part 1 of the series&lt;/a&gt; so I wont repeat it here. &lt;p&gt;Now let's add a new ASP.NET web form to our project and let's call it &lt;em&gt;CodeBehindBar.aspx&lt;/em&gt;. We will only add a single PlaceHolder object to the markup side of our script so it looks like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: #ffee62"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: blue"&gt;@ &lt;/span&gt;&lt;span style="color: #a31515"&gt;Page &lt;/span&gt;&lt;span style="color: red"&gt;Language&lt;/span&gt;&lt;span style="color: blue"&gt;="C#" &lt;/span&gt;&lt;span style="color: red"&gt;AutoEventWireup&lt;/span&gt;&lt;span style="color: blue"&gt;="true" &lt;/span&gt;&lt;span style="color: red"&gt;CodeFile&lt;/span&gt;&lt;span style="color: blue"&gt;="CodeBehindBar.aspx.cs" &lt;/span&gt;&lt;span style="color: red"&gt;Inherits&lt;/span&gt;&lt;span style="color: blue"&gt;="CodeBehindBar" &lt;/span&gt;&lt;span style="background: #ffee62"&gt;%&amp;gt;

&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #a31515"&gt;DOCTYPE &lt;/span&gt;&lt;span style="color: red"&gt;html PUBLIC &lt;/span&gt;&lt;span style="color: blue"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;

&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;html &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;="http://www.w3.org/1999/xhtml" &amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;head &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;="server"&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Untitled Page&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;form &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;="form1" &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;="server"&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;PlaceHolder &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;="ChartPlaceHolder" &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;="server" /&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;form&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;html&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Now let's switch to the code-behind file.&lt;/p&gt;
&lt;p&gt;We will be creating a column chart with two graphs and we'll use &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&amp;amp;displaylang=en"&gt;Northwind&lt;/a&gt; database as data source. The first graph will represent sales totals for 1997 grouped by category and divided by 1000 (just for the sake of being in the same range as our second graph). The second graph will show quantities of products in each group we have in stock.&lt;/p&gt;
&lt;p&gt;Make sure that you have access to some SQL Server instance with Northwind database installed, connection string setup, and let's start by pulling our data from SQL Server and placing it into DataSet:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: green"&gt;// Get data from Northwind
&lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlConnection &lt;/span&gt;conn = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlConnection&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ConfigurationManager&lt;/span&gt;.ConnectionStrings[&lt;span style="color: #a31515"&gt;"NorthwindConnectionString"&lt;/span&gt;].ConnectionString);

&lt;span style="color: #2b91af"&gt;SqlCommand &lt;/span&gt;myCommand = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlCommand&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"select CategoryName, CategorySales/1000 as CategorySales from [Category Sales for 1997]"&lt;/span&gt;, conn);
&lt;span style="color: #2b91af"&gt;SqlDataAdapter &lt;/span&gt;da = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlDataAdapter&lt;/span&gt;(myCommand);
&lt;span style="color: #2b91af"&gt;DataSet &lt;/span&gt;ds = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataSet&lt;/span&gt;();
da.Fill(ds, &lt;span style="color: #a31515"&gt;"Category Sales for 1997"&lt;/span&gt;);

myCommand.CommandText = &lt;span style="color: #a31515"&gt;"select CategoryName, sum(UnitsInStock) as UnitsInStock from [Products by Category] group by CategoryName"&lt;/span&gt;;
da.Fill(ds, &lt;span style="color: #a31515"&gt;"Products by Category"&lt;/span&gt;);

conn.Close();
&lt;/pre&gt;
&lt;p&gt;Now it's time to create our chart. We create a ColumnChart object and setup it's DataSource. This is what will be used for the chart series (X axis).&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: green"&gt;// create column chart
&lt;/span&gt;&lt;span style="color: #2b91af"&gt;ColumnChart &lt;/span&gt;chart = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ColumnChart&lt;/span&gt;();
chart.DataSource = ds.Tables[&lt;span style="color: #a31515"&gt;"Category Sales for 1997"&lt;/span&gt;].DefaultView;
chart.DataSeriesIDField = &lt;span style="color: #a31515"&gt;"CategoryName"&lt;/span&gt;;
chart.DataSeriesValueField = &lt;span style="color: #a31515"&gt;"CategoryName"&lt;/span&gt;; &lt;span style="color: green"&gt;// here it's the same as ID and could've been ommited
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Notice that we've specified "CategoryName" as both SeriesIDField and SeriesValueField. This isn't necessary in case like this were we have the same field for both ID and Value. It would suffice to just specify the ID, but I've added Value line so you know you can use different data fields for that.&lt;/p&gt;
&lt;p&gt;What we've done so far is created a grid where to add actual data graphs. Now let's create 2 graphs:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: green"&gt;// crete sales graph
&lt;/span&gt;&lt;span style="color: #2b91af"&gt;ColumnChartGraph &lt;/span&gt;graph1 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ColumnChartGraph&lt;/span&gt;();
graph1.DataSource = ds.Tables[&lt;span style="color: #a31515"&gt;"Category Sales for 1997"&lt;/span&gt;].DefaultView;
graph1.DataSeriesItemIDField = &lt;span style="color: #a31515"&gt;"CategoryName"&lt;/span&gt;;
graph1.DataValueField = &lt;span style="color: #a31515"&gt;"CategorySales"&lt;/span&gt;;
graph1.Title = &lt;span style="color: #a31515"&gt;"Sales (in thousands)"&lt;/span&gt;;

&lt;span style="color: green"&gt;// crete stock graph
&lt;/span&gt;&lt;span style="color: #2b91af"&gt;ColumnChartGraph &lt;/span&gt;graph2 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ColumnChartGraph&lt;/span&gt;();
graph2.DataSource = ds.Tables[&lt;span style="color: #a31515"&gt;"Products by Category"&lt;/span&gt;].DefaultView;
graph2.DataSeriesItemIDField = &lt;span style="color: #a31515"&gt;"CategoryName"&lt;/span&gt;;
graph2.DataValueField = &lt;span style="color: #a31515"&gt;"UnitsInStock"&lt;/span&gt;;
graph2.Title = &lt;span style="color: #a31515"&gt;"Units in stock"&lt;/span&gt;;
&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;and add these graphs to our chart:&lt;/p&gt;&lt;pre class="code"&gt;chart.Graphs.Add(graph1);
chart.Graphs.Add(graph2);
&lt;/pre&gt;
&lt;p&gt;What's left is just data-binding the chart and adding it to our place holder control on the page&lt;/p&gt;&lt;pre class="code"&gt;chart.DataBind();
ChartPlaceHolder.Controls.Add(chart);
&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;And that' basically it. This is what you should see if you run this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/AddIntera.Part3ColumnChartfromCodebehind_880F/amcharts_code_behind_2.jpg"&gt;&lt;img height="521" alt="amcharts_code_behind" src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/AddIntera.Part3ColumnChartfromCodebehind_880F/amcharts_code_behind_thumb.jpg" width="510" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;You can customize the look and feel by changing various properties according to your taste.&lt;/p&gt;
&lt;p&gt;Download the source code here: &lt;a href="http://devblog.ailon.org/_files/CodeBehindBar.zip"&gt;CodeBehindBar.zip (1kb)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://devblog.ailon.org/devblog/post/2008/08/Add-Interactive-Flash-Charts-to-Your-ASPNET-Web-Application-Part-4-Column-Chart-from-Code-behind.aspx&amp;amp;title=Add Interactive Flash Charts to Your ASP.NET Web Application. Part 4: Column Chart from Code-behind"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://devblog.ailon.org/devblog/post/2008/08/Add-Interactive-Flash-Charts-to-Your-ASPNET-Web-Application-Part-4-Column-Chart-from-Code-behind.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/j2IhXU2JmIk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/j2IhXU2JmIk/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/08/08/Add-Interactive-Flash-Charts-to-Your-ASPNET-Web-Application-Part-4-Column-Chart-from-Code-behind.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=d42fbf77-fe39-477f-92b4-acc40e72dc59</guid>
      <pubDate>Fri, 08 Aug 2008 10:29:36 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=d42fbf77-fe39-477f-92b4-acc40e72dc59</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=d42fbf77-fe39-477f-92b4-acc40e72dc59</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/08/08/Add-Interactive-Flash-Charts-to-Your-ASPNET-Web-Application-Part-4-Column-Chart-from-Code-behind.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=d42fbf77-fe39-477f-92b4-acc40e72dc59</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=d42fbf77-fe39-477f-92b4-acc40e72dc59</feedburner:origLink></item>
    <item>
      <title>VS2008 Purchasing Part 3: Great Success... not really</title>
      <description>&lt;p&gt;I have 9 days left on my Visual Studio 2008 trial and suddenly "Upgrade..." button no longer leads to "Content not found" page. It was still "not found" a week ago or so, but now it looked promising. Unfortunately digital registration is only an option for customers in USA and Canada. So we (the rest of the world) are still out of luck.&lt;/p&gt; &lt;p&gt;So I assume I'll have to go the old-fashioned way and it sucks.&lt;/p&gt; &lt;p&gt;See also:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Part 1: &lt;a href="http://devblog.ailon.org/devblog/post/2008/05/Why-is-it-so-Fing-Difficult-to-Buy-Visual-Studio!.aspx"&gt;Why is it so F#...ing Difficult to Buy Visual Studio!?&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Part 2: &lt;a href="http://devblog.ailon.org/devblog/post/2008/06/Visual-Studio-Trial-Upgrade-24-days-later.aspx"&gt;Visual Studio Trial Upgrade: 24 days later&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/3--0Vu5ulrk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/3--0Vu5ulrk/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/07/29/VS2008-Purchasing-Part-3-Great-Success-not-really.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=f12ada3b-bf93-4ac7-97ac-dd353c94c81c</guid>
      <pubDate>Tue, 29 Jul 2008 10:47:03 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=f12ada3b-bf93-4ac7-97ac-dd353c94c81c</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=f12ada3b-bf93-4ac7-97ac-dd353c94c81c</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/07/29/VS2008-Purchasing-Part-3-Great-Success-not-really.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=f12ada3b-bf93-4ac7-97ac-dd353c94c81c</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=f12ada3b-bf93-4ac7-97ac-dd353c94c81c</feedburner:origLink></item>
    <item>
      <title>When to show your work to the client?</title>
      <description>&lt;p&gt;When is the best time to show the work you are doing to your customer? In an ideal world with ideal clients the answer would be simple - as early as possible. Clients could provide valuable feedback before you went to far in the wrong direction.&lt;/p&gt; &lt;p&gt;Unfortunately in real life I find this approach to be counterproductive. Most (if not all) of the times as soon as I show early prototype to the client a process we internally call "moving pixels" begins. Color and/or size of some text on some unimportant page is wrong, that empty shopping cart text is not clear enough, these 2 buttons should be reordered, etc. Right after the first demo actual feature development stops and polishing of cosmetic stuff begins.&lt;/p&gt; &lt;p&gt;On the other hand in cases when you hold off demonstration as long as possible clients become impatient, they could suffer a heart attack when they finally see something and it's not 100% what they've expected, then you could suffer a heart attack when you hear that your product sucks, you suck and everyone you know and care about suck.&lt;/p&gt; &lt;p&gt;Does anyone have a universal recipe on how to balance this process? I've settled on dealing with "pixel moving" but I don't like it to the point I want to give up all contract work altogether.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/bJqS8iRWpO0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/bJqS8iRWpO0/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/07/14/When-to-show-your-work-to-the-client.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=611c3d28-37fd-488b-969d-1ea857fb53c6</guid>
      <pubDate>Mon, 14 Jul 2008 15:24:04 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=611c3d28-37fd-488b-969d-1ea857fb53c6</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=611c3d28-37fd-488b-969d-1ea857fb53c6</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/07/14/When-to-show-your-work-to-the-client.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=611c3d28-37fd-488b-969d-1ea857fb53c6</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=611c3d28-37fd-488b-969d-1ea857fb53c6</feedburner:origLink></item>
    <item>
      <title>Automatic Defaults</title>
      <description>&lt;p&gt;&lt;img style="margin: 0px 0px 5px 5px" height="173" alt="ryanair-hertz" src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/AutomaticDefaults_FA47/ryanair-hertz_3.gif" width="193" align="right" border="0"&gt; Every time I go to &lt;a href="http://www.ryanair.com/site/EN/?form=hertz"&gt;car rental sub-site of Ryanair.com&lt;/a&gt; I get frustrated with smarty-pants "Pick up Country" dropdown. As you can see on the screenshot, it automatically selects pickup country by visitor's IP address (or something like that).&lt;/p&gt; &lt;p&gt;Now I don't know how many people fly from UK to UK or from Germany to Germany, but I know for sure that you just can't fly with Ryanair from Lithuania to Lithuania. So this automatic selection super-feature is at the very least useless and in reality it's annoying. As I said you can't fly from Lithuania to Lithuania with Ryanair and what are the chances that when you're already in Lithuania you will go to Ryanair.com to rent a car? I think something like 1:10000. On the other hand automatic selection in "Country of Residence" is actually a nice little feature which probably works correctly 99% of the time.&lt;/p&gt; &lt;p&gt;So what should be in that pickup country dropdown by default? &lt;/p&gt; &lt;p&gt;The most obvious option is the message "Choose one" like in that "Pick up Location" box. And by the way there's only one Ryanair "location" in Lithuania so why the hell it's not selected by default? While just leaving "Choose one" seems most logical to me and easiest to "implement", I accept that it might be not fancy enough for someone at Ryanair. In this case they could've determined my location and then get the most popular destination from that location and make it the default.&lt;/p&gt; &lt;p&gt;Are there any other logical default values for that dropdown? I don't know. What I know is that seeing my own country there annoys me. In most cases no AI is better than seriously flawed AI.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/hywt5nG755U" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/hywt5nG755U/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/06/27/Automatic-Defaults.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=48ddafc4-ca77-4291-8ac9-25ba9cf81be1</guid>
      <pubDate>Fri, 27 Jun 2008 18:06:20 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=48ddafc4-ca77-4291-8ac9-25ba9cf81be1</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=48ddafc4-ca77-4291-8ac9-25ba9cf81be1</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/06/27/Automatic-Defaults.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=48ddafc4-ca77-4291-8ac9-25ba9cf81be1</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=48ddafc4-ca77-4291-8ac9-25ba9cf81be1</feedburner:origLink></item>
    <item>
      <title>Klok - Personal Time Tracking Made Easy</title>
      <description>&lt;p&gt;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/KlokPersonalTimeTrackingMadeEasy_C73C/klok_main_2.jpg"&gt;&lt;img height="319" alt="klok_main" src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/KlokPersonalTimeTrackingMadeEasy_C73C/klok_main_thumb.jpg" width="500" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;When I saw a post about &lt;a href="http://klok.mcgraphix.com/klok/index.htm"&gt;Klok&lt;/a&gt; on &lt;a href="http://www.downloadsquad.com/2008/06/20/klok-time-tracking-made-simple/"&gt;DownloadSquad&lt;/a&gt; I immediately thought that the idea is brilliant. Now that I've used Klok for 2 days I can say that implementation is a little rough around the edges but definitely useable and the idea is really brilliant and not only on paper but in real life too.&lt;/p&gt; &lt;p&gt;So, what is Klok? In it's creator's Rob McKeown's words:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Klok is a tool intended to be used by individuals, like myself, who have a need to track the time they spend on projects, tasks or anything else for that matter.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;There are many project/progress tracking solutions out there but for tasks when you work alone or you are not a project manager needing to track activity of multiple developers using something complex is an overkill. When I needed to track time spent on some project most of the time I've resorted to post-it's or spreadsheets and system clock but with Klok I can save trees and my own time. And, by the way, it can export your timesheet to Excel, too.&lt;/p&gt; &lt;p&gt;Basically you just have a small bar on your screen&lt;/p&gt; &lt;p&gt;&lt;a href="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/KlokPersonalTimeTrackingMadeEasy_C73C/klok_bar_2.jpg"&gt;&lt;img height="50" alt="klok_bar" src="http://devblog.ailon.org/devblog/image.axd?picture=WindowsLiveWriter/KlokPersonalTimeTrackingMadeEasy_C73C/klok_bar_thumb.jpg" width="400" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and select a project you are currently working on. And the stopwatch starts. When you are done with the project you switch to other project or just hit "stop". Projects can have sub-projects and sub-projects can have sub-sub-projects and so on. Then you can view your week in calendar-like fashion. Or look at your data on project basis. Or generate reports. Or export data to Excel.&lt;/p&gt; &lt;p&gt;Not everything is pink in Klok: I wish it was just a tray icon or Vista SideBar Gadget rather than bar shown above, I wish there were some configuration options (a week doesn't start on Sunday over here), the UI isn't perfectly smooth and for reasons unknown not all projects are shown in project dropdown all the time. But all these are minor issues which I believe will be addressed over time because overall this is a really nice add-on to my toolset.&lt;/p&gt; &lt;p&gt;You can find Klok at &lt;a href="http://klok.mcgraphix.com/"&gt;http://klok.mcgraphix.com/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;P.S.: I was somewhat skeptical about all this &lt;a href="http://www.adobe.com/products/air/"&gt;Adobe AIR&lt;/a&gt; thing but now I'm already using 3 AIR apps on a regular basis: &lt;a href="http://www.twhirl.org/"&gt;twhirl&lt;/a&gt; (which is probably one of the most beautiful and polished little apps I've seen), &lt;a href="http://www.pandora.com/desktop"&gt;Pandora&lt;/a&gt; (well, it's actually a website shell but still) and now &lt;a href="http://klok.mcgraphix.com/"&gt;Klok&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/ZyAqnIK6KpU" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/ZyAqnIK6KpU/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/06/24/Klok-Personal-Time-Tracking-Made-Easy.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=6ef3b5fe-f5e6-4a0b-aec7-2d93a25dc5fb</guid>
      <pubDate>Tue, 24 Jun 2008 14:43:50 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=6ef3b5fe-f5e6-4a0b-aec7-2d93a25dc5fb</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=6ef3b5fe-f5e6-4a0b-aec7-2d93a25dc5fb</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/06/24/Klok-Personal-Time-Tracking-Made-Easy.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=6ef3b5fe-f5e6-4a0b-aec7-2d93a25dc5fb</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=6ef3b5fe-f5e6-4a0b-aec7-2d93a25dc5fb</feedburner:origLink></item>
    <item>
      <title>He DIDN'T say THAT</title>
      <description>&lt;p&gt;Apparently the most popular Bill Gates quote is "fake":&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Some of the most oft-repeated comments attributed to Bill Gates through the years were not uttered by Bill Gates. Take for instance "&lt;strong&gt;640K ought to be enough for anybody&lt;/strong&gt;," which he supposedly said in 1981 to note that the 640K bytes of memory in IBM's PC was a significant breakthrough.&lt;/p&gt; &lt;p&gt;... Gates has addressed the 640K quote in interviews. "&lt;strong&gt;I've said some stupid things and some wrong things, but not that&lt;/strong&gt;. No one involved in computers would ever say that a certain amount of memory is enough for all time ... I keep bumping into that silly quotation attributed to me that says 640K of memory is enough. There's never a citation; the quotation just floats like a rumor, repeated again and again," he told Bloomberg Business Applications in 1996.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.cio.com/article/print/405313"&gt;The Quotable Bill Gates&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Dang. The world will never be the same.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/devblogailonorg/~4/NcBkyziOrD4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/devblogailonorg/~3/NcBkyziOrD4/post.aspx</link>
      <author>ailon</author>
      <comments>http://devblog.ailon.org/devblog/post/2008/06/24/He-DIDNT-say-THAT.aspx#comment</comments>
      <guid isPermaLink="false">http://devblog.ailon.org/devblog/post.aspx?id=ab08f68e-1715-48bb-b0b1-e270e84f1b84</guid>
      <pubDate>Tue, 24 Jun 2008 13:59:10 +0300</pubDate>
      <dc:publisher>ailon</dc:publisher>
      <pingback:server>http://devblog.ailon.org/devblog/pingback.axd</pingback:server>
      <pingback:target>http://devblog.ailon.org/devblog/post.aspx?id=ab08f68e-1715-48bb-b0b1-e270e84f1b84</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://devblog.ailon.org/devblog/trackback.axd?id=ab08f68e-1715-48bb-b0b1-e270e84f1b84</trackback:ping>
      <wfw:comment>http://devblog.ailon.org/devblog/post/2008/06/24/He-DIDNT-say-THAT.aspx#comment</wfw:comment>
      <wfw:commentRss>http://devblog.ailon.org/devblog/syndication.axd?post=ab08f68e-1715-48bb-b0b1-e270e84f1b84</wfw:commentRss>
    <feedburner:origLink>http://devblog.ailon.org/devblog/post.aspx?id=ab08f68e-1715-48bb-b0b1-e270e84f1b84</feedburner:origLink></item>
  </channel>
</rss>
