title: Wpf Style: Binding to Child Property via ElementName
body: <p>I have an Application that gives me the Option to change the Application-Theme via a RessourceDictionary, meaning I can only use pure XAML.</p>
  
  <p>Now, what I want to do is hide a DockPanel, that does not have an ElementName, but it has a Child with an x:Name Property.</p>
  
  <pre><code>&lt;Style TargetType="DockPanel"&gt;
           &lt;Setter Property="Visibility" Value="{Binding RelativeSource={RelativeSource Self}, Path=Child.Visibility}"/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>With this Code I´m getting the first Child of the DockPanel,
  but I want to bind the value to the specific Child which has a unique ElementName.</p>
  
  <p>So not every DockPanel disappears, only the one that has a Child of Type e.g. "TextBox" with an Elementname of "MyTextBox".</p>
  
  <p>Anybody has an Idea how to do that? Thanks ;-)</p>