Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try a grid around your <code>ScrollViwer</code> instead of the <code>StackPanel</code>. I think <code>StackPanel</code> will provide as much height as the internal content wants, so here the <code>Scrollviwer</code> doesn't work properly since its height is not get restricted by its parent control.</p> <p>You can understand the issue from the example below.</p> <pre><code>&lt;StackPanel&gt; &lt;ScrollViewer&gt; &lt;ItemsControl &gt; &lt;Rectangle Stroke="#FFC3C3C3" Height="300" Fill="Black" StrokeThickness="4" Width="200"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Width="200" Height="300" Fill="Black" StrokeThickness="4"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Height="300" Fill="Black" StrokeThickness="4" Width="200"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Width="200" Height="300" Fill="Black" StrokeThickness="4"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Width="200" Height="300" Fill="Black" StrokeThickness="4"/&gt; &lt;/ItemsControl&gt; &lt;/ScrollViewer&gt; &lt;/StackPanel&gt; </code></pre> <p>Above code is similar to yours and it doesn't give you scrollbars. But see the below code in which I changed only the <code>StackPanel</code> to a <code>Grid</code>(Any panel which respects the size of its children based on panels size but stackpanel doesn't)</p> <pre><code>&lt;Grid&gt; &lt;ScrollViewer&gt; &lt;ItemsControl &gt; &lt;Rectangle Stroke="#FFC3C3C3" Height="300" Fill="Black" StrokeThickness="4" Width="200"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Width="200" Height="300" Fill="Black" StrokeThickness="4"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Height="300" Fill="Black" StrokeThickness="4" Width="200"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Width="200" Height="300" Fill="Black" StrokeThickness="4"/&gt; &lt;Rectangle Stroke="#FFC3C3C3" Width="200" Height="300" Fill="Black" StrokeThickness="4"/&gt; &lt;/ItemsControl&gt; &lt;/ScrollViewer&gt; &lt;/Grid&gt; </code></pre> <p><strong>UPDATE</strong> : But if you really need to use <code>StackPanel</code> then you might need to set the size for your <code>ScrollViwer</code> to get the Content scroll</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload