title: How to get the parent of an object in WinUI3 with C++/WinRT?
body: <p>This is how the xaml looks like:</p>
  <pre><code>&lt;ListView HorizontalContentAlignment=&quot;Stretch&quot;
                        x:Name=&quot;listViewMessages&quot;
                        Grid.Column=&quot;1&quot;
                        ItemsSource=&quot;{x:Bind MessageViewModel.Messages}&quot;
                        Height=&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}&quot;
                        ItemClick=&quot;listViewMessages_ItemClick&quot;&gt;
                  &lt;ListView.HeaderTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;Grid&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  ...
                              &lt;/Grid.ColumnDefinitions&gt;
                          &lt;/Grid&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListView.HeaderTemplate&gt;
  
                  &lt;ListView.ItemTemplate&gt;
                      &lt;DataTemplate x:DataType=&quot;local:Message&quot;&gt;
                          &lt;Grid HorizontalAlignment=&quot;{x:Bind Path=MineToHorizontalAlignment()}&quot; Background=&quot;{x:Bind Path=MineBackgroundColor()}&quot; CornerRadius=&quot;8&quot; Margin=&quot;0,6,0,2&quot; Padding=&quot;6&quot;&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  ...
                              &lt;/Grid.ColumnDefinitions&gt;
  
                              ...
                              &lt;Button Grid.Column=&quot;5&quot; Click=&quot;Button_Click&quot;&gt;D&lt;/Button&gt;
                          &lt;/Grid&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListView.ItemTemplate&gt;
              &lt;/ListView&gt;
  </code></pre>
  <p>So when I will click the button I want to get the list view item of the clicked button.</p>
  <p>How can I achieve this?</p>
  <p>Edit:
  I changed the xaml example to a more specific one.</p>