title: DataTemplate as resource with customizable bindings
body: <p>I have a <code>DataTemplate</code> that I use to present a value with symbol that looks something like this:</p>
  
  <pre><code>&lt;DataTemplate&gt;
      &lt;TextBlock VerticalAlignment="Center"&gt;
          &lt;TextBlock.Text&gt;
              &lt;MultiBinding StringFormat="{}{0:G} {1}"&gt;
                  &lt;Binding Path="DisplayValue" /&gt;
                  &lt;Binding Path="UnitSymbol" /&gt;
              &lt;/MultiBinding&gt;
          &lt;/TextBlock.Text&gt;
      &lt;/TextBlock&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>This template is repeated frequently in my XAML with different bindings (i.e. <code>DisplayValue</code> and <code>UnitSymbol</code> differs). I would like to create a <code>DataTemplate</code> as a resource and change the binding, e.g. something like <code>ItemTemplate="{StaticResource MyUnitTemplate, ValuePath=DisplayValue, UnitPath=UnitSymbol}"</code>. How can I achieve this?</p>
  
  <p>Note! I realize I could create a custom data type that holds a value with unit and create a template for this type, but I'm curious to if it is possible to use resources as mentioned above.</p>