title: How can I layer a Polygon over a StackPanel, which is inside a ScrollViewer?
body: <p>I have a horizontal ScrollViewer that contains a single StackPanel, which is initially empty. UserControls are created on button-click, and added to the StackPanel. The code looks something like this:</p>
  
  <pre><code>&lt;ScrollViewer Grid.Column="1" Grid.Row="0" RequestedTheme="Dark" ScrollViewer.HorizontalScrollMode="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollMode="Disabled" ScrollViewer.VerticalScrollBarVisibility="Hidden"&gt;
      &lt;StackPanel x:Name="Container" HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto"&gt;
          &lt;!--User controls added here dynamically--&gt;
      &lt;/StackPanel&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>As you can see the ScrollViewer is itself in a larger Grid. Now I would like a Polygon to be added to this ScrollViewer, but I cannot add it as a child directly, since "Content can only be set once". If I add it to the StackPanel in code-behind (after setting Canvas left, top and ZIndex), the UserControls are added <em>below</em> the Polygon. I want them to be under or over, either will do. Is this even possible? Right now, my Polygon shares the same Grid Row and Column as the ScrollViewer. Here is my Polygon:</p>
  
  <pre><code>&lt;Polygon x:Name="Gripper" Grid.Column="1" Grid.Row="0" Points="0,0 0,730 -30,750 -30,800 30,800 30,750 0,730 0,100" Stroke="#DEDEDE" StrokeThickness="1" Opacity="1.0" ManipulationMode="TranslateX" ManipulationDelta="Gripper_ManipulationDelta"&gt; 
      &lt;Polygon.Fill&gt;
          &lt;SolidColorBrush Color="#FFFFFF" Opacity="0.9"/&gt;
      &lt;/Polygon.Fill&gt;
      &lt;Polygon.RenderTransform&gt;
          &lt;CompositeTransform /&gt;
      &lt;/Polygon.RenderTransform&gt;
  &lt;/Polygon&gt; 
  </code></pre>
  
  <p>I am okay with adding it in XAML or C#, but I think I would prefer to do it in C# since I would like to change the points based on the size of the screen. </p>