title: Cannot find source for binding with reference in nested Style / DataGrid DataTemplates
body: <p>I have a <code>Control</code> (<code>ZlsUnitBrowserActive</code>) with two <code>DependencyProperties</code> <code>MaxWidthIdentifier</code>/<code>PropertiesDataTemplate</code>. I'm stuck when try to bind these two properties in the <code>Style</code>:</p>
  
  <blockquote>
    <p>System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='PlcFramework.Zls.Production.ProductionControls.ZlsUnitBrowserActive', AncestorLevel='1''. BindingExpression:Path=PropertiesDataTemplate; DataItem=null; target element is 'DataGridTemplateColumn' (HashCode=30225241); target property is 'CellTemplate' (type 'DataTemplate')</p>
  </blockquote>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Style TargetType="productionControls:ZlsUnitBrowserActive"&gt;
      &lt;Style.Setters&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="productionControls:ZlsUnitBrowserActive"&gt;
                      &lt;DataGrid&gt;
                          &lt;DataGrid.Columns&gt;
                              &lt;DataGridTemplateColumn&gt;
                                  &lt;DataGridTemplateColumn.CellTemplate 
                                      MaxWidth="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=productionControls:ZlsUnitBrowserActive}, Path=MaxWidthIdentifier}"
                                      CellTemplate="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=productionControls:ZlsUnitBrowserActive}, Path=PropertiesDataTemplate}"/&gt;
                              &lt;/DataGridTemplateColumn&gt;
                          &lt;/DataGrid.Columns&gt;
                      &lt;/DataGrid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style.Setters&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Is there a special trick? Also tried by caching the <code>ZlsUnitBrowserActive</code> instance in <code>DataGrid.Tag</code> (see post: <a href="https://stackoverflow.com/a/3668699/6229375">https://stackoverflow.com/a/3668699/6229375</a>), without success.</p>