title: WPF Border DesiredHeight
body: <p>The following <a href="http://msdn.microsoft.com/en-us/library/ms753296.aspx#example" rel="noreferrer">Microsoft example code</a> contains the following:</p>
  
  <pre><code>&lt;Grid&gt;
  ...     
    &lt;Border Name="Content" ... &gt;
  ...     
    &lt;/Border&gt;
  &lt;/Grid&gt;
  &lt;ControlTemplate.Triggers&gt;
    &lt;Trigger Property="IsExpanded" Value="True"&gt;
       &lt;Setter TargetName="ContentRow" Property="Height"
               Value="{Binding ElementName=Content,Path=DesiredHeight}" /&gt;
    &lt;/Trigger&gt;
  ...
  &lt;/ControlTemplate.Triggers&gt;
  </code></pre>
  
  <p>When run, however, this code generates the following databinding error:</p>
  
  <pre><code>System.Windows.Data Error: 39 : BindingExpression path error: 'DesiredHeight' property not found on 'object' ''Border' (Name='Content')'. BindingExpression:Path=DesiredHeight; DataItem='Border' (Name='Content'); target element is 'RowDefinition' (HashCode=2034711); target property is 'Height' (type 'GridLength')
  </code></pre>
  
  <p>Despite this error, the code works correctly.  I have looked through the documentation and <code>DesiredHeight</code> does not appear to be a member of <code>Border</code>.  Can anyone explain where <code>DesiredHeight</code> is coming from?  Also, is there any way to resolve/suppress this error so my program output is clean?</p>