title: Bind to a property of a parent element in wpf
body: <p>'I want to bind the Height property of the RichTextBox to the Height Property of the GridView`s Row. How can I do that? I do not know how to get the Row's Height as I can not access the Row in xaml what I would like to do.</p>
  
  <p>The Ancestor type should be GridViewHeaderRow , but I do not know its level...</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code> &lt;my:RadGridView  Height="524" RowHeight="300" ItemsSource="{Binding Lessons}" AutoGenerateColumns="False" Name="dataGrid1" VerticalAlignment="Top" SelectionMode="Single" CanUserSortColumns="False" IsFilteringAllowed="False"&gt;
  
              &lt;my:RadGridView.Columns&gt;
                  &lt;my:GridViewDataColumn  DataMemberBinding="{Binding SchoolclassName}" Header="Schoolclass" Width="0.1*" /&gt;
                  &lt;my:GridViewDataColumn DataMemberBinding="{Binding SubjectName}"     Header="Subject"      Width="0.1*" /&gt;
  
                  &lt;my:GridViewDataColumn  Width="0.3*" Header="Homework"&gt;
                      &lt;my:GridViewDataColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;RichTextBox Height="{Binding ElementName=dataGrid1,Path=RowHeight}" &gt;
                                  &lt;FlowDocument&gt;
                                      &lt;Paragraph&gt;
                                          &lt;Run Text="{Binding Homework}"/&gt;
                                      &lt;/Paragraph&gt;
                                  &lt;/FlowDocument&gt;
                              &lt;/RichTextBox&gt;                                
                          &lt;/DataTemplate&gt;
                      &lt;/my:GridViewDataColumn.CellTemplate&gt;
  
  
  &lt;my:RadGridView Height="524" ItemsSource="{Binding Lessons}" AutoGenerateColumns="False" Name="dataGrid1" VerticalAlignment="Top" SelectionMode="Single" CanUserSortColumns="False" IsFilteringAllowed="False"&gt;
              &lt;my:RadGridView.Columns&gt;
  
                  &lt;my:GridViewDataColumn Name="ContentColumn" Width="0.3*" Header="Content"&gt;
                      &lt;my:GridViewDataColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;RichTextBox Height="{Binding ElementName=MyRowNameToBindTo,Path=Height}"&gt;
                                  &lt;FlowDocument&gt;
                                      &lt;Paragraph&gt;
                                          &lt;Run Text="{Binding Content}"/&gt;
                                      &lt;/Paragraph&gt;
                                  &lt;/FlowDocument&gt;
                              &lt;/RichTextBox&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/my:GridViewDataColumn.CellTemplate&gt;
  </code></pre>
  
  <p>...</p>