title: How can I bind a string to double in WPF?
body: <p>I want to set a binding. The problem is that the target is of type string but the source is of type double.
  In the following code VersionNumber is of type double. When I run this, the textblock is empty, without throwing any exceptions.
  How can I set this binding?</p>
  
  <pre><code>&lt;Style TargetType="{x:Type MyControl}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type MyControl}"&gt;
                  &lt;TextBlock Text="{TemplateBinding Property=VersionNumber}" /&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;        
  &lt;/Style&gt;
  </code></pre>