title: How to bind an element property to a property of the ancestor page in UWP
body: <p>There are two pages: <strong>MainPage</strong> and <strong>AddQuotePage</strong></p>
  
  <p>MainPage.xaml, located in the project root folder has a <code>Frame</code> that loads AddQuotePage.xaml which is located in the <em>Views</em> folder. </p>
  
  <p><strong>MainPage</strong> contains the titlebar as a <code>RelativePanel</code> and a <code>SplitView</code> for displaying the hamburger menu and the content in a <code>Frame</code>.</p>
  
  <p><strong>MainPage</strong> works like a shell that loads in its <code>Frame</code> different app 
  <strong>MainPage</strong> has a <code>List&lt;Icon&gt; CategoryIcons</code> property.</p>
  
  <p><strong>AddQuotePage</strong> contains a <code>GridView</code> for which I want to set <code>ItemsSource="{Binding MainPage.CategoryIcons}"</code> and set an ItemTemplate like this</p>
  
  <pre><code>&lt;GridView ItemsSource="{Binding MainPage.CategoryIcons}"&gt;
      &lt;GridView.ItemTemplate&gt;
          &lt;DataTemplate x:DataType="data:Icon"&gt;
               &lt;BitmapIcon UriSource="{x:Bind Uri}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/GridView.ItemTemplate&gt;
   &lt;/GridView&gt;
  </code></pre>
  
  <p>This does not work. In WPF you would have <code>{Binding Path=PathToProperty, RelativeSource={RelativeSource AncestorType={x:Type typeOfAncestor}}}</code> but this doesn't exist in UWP or at least I didn't find it.</p>
  
  <p>How do I reference the property from MainPage so that data binding is valid?</p>