# ScrollView within StackPanel -\> No full Scroll

**URL:** <https://forums.fusetools.com/t/scrollview-within-stackpanel-no-full-scroll/4757>\
**Category:** General\
**Created:** [August 12, 2016, 7:39pm UTC](https://forums.fusetools.com/t/scrollview-within-stackpanel-no-full-scroll/4757 "2016-08-12T19:39:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitnick](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Mitnick](https://forums.fusetools.com/u/Mitnick)\
**Post date:** [August 12, 2016, 7:39pm UTC](https://forums.fusetools.com/t/scrollview-within-stackpanel-no-full-scroll/4757/1 "2016-08-12T19:39:56Z")

</div>

If I create a ScrollView lik this, then I’m able to scroll to the whole list of rectangles:

```auto
<App>

  <ScrollView>
      <StackPanel ItemSpacing="20">
          <Rectangle Height="100" Color="Red" />
          <Rectangle Height="100" Color="Blue" />
          <Rectangle Height="100" Color="Red" />
          <Rectangle Height="100" Color="Blue" />
          <Rectangle Height="100" Color="Red" />
          <Rectangle Height="100" Color="Blue" />
          <Rectangle Height="100" Color="Red" />
      </StackPanel>
  </ScrollView>

</App>

```

But if I want some elements like Buttons and Text above it like this:

```auto
<App>

    <StackPanel>

        <Button Text="Press me!" />
        <Text Value="The list:" />

        <ScrollView>
            <StackPanel ItemSpacing="20">
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
            </StackPanel>
        </ScrollView>

    </StackPanel>

</App>

```

Then I cannot scroll through the whole list. It will restrict it.

Why is it like that? How can I change the behaviour?

---

<div class="post-metadata">

**Author:** ![Edwin\_Reynoso](https://avatars.discourse-cdn.com/v4/letter/e/e99b99/32.png) [@Edwin\_Reynoso](https://forums.fusetools.com/u/Edwin_Reynoso)\
**Post date:** [August 13, 2016, 3:11am UTC](https://forums.fusetools.com/t/scrollview-within-stackpanel-no-full-scroll/4757/2 "2016-08-13T03:11:54Z")

</div>

The `Button` and `Text` are ontop of the `StackPanel` you probably want to Dock them first:

Either fixed Dock:

```auto
<App>
    <DockPanel>
        <Button Dock="Top" Text="Press me!" />
        <Text Dock="Top" Value="The list:" />
        <ScrollView>
            <StackPanel ItemSpacing="20">
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
            </StackPanel>
        </ScrollView>
    </DockPanel>
</App>

```

or (Does same as above, but perahaps better solution because it has a dedicated Docked parent panel):

```auto
<App>
    <DockPanel>
        <StackPanel Dock="Top">
            <Button Text="Press me!" />
            <Text Value="The list:" />
        </StackPanel>
        <ScrollView>
            <StackPanel ItemSpacing="20">
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
                <Rectangle Height="100" Color="Blue" />
                <Rectangle Height="100" Color="Red" />
            </StackPanel>
        </ScrollView>
    </DockPanel>
</App>

```

or you want to Scroll the whole thing but always have something on top of that Scrollable list:

```auto
<App>
    <DockPanel>
        <ScrollView>
            <DockPanel>
                <StackPanel Dock="Top">
                    <Button Text="Press me!" />
                    <Text Value="The list:" />
                </StackPanel>
                <StackPanel ItemSpacing="20">
                    <Rectangle Height="100" Color="Red" />
                    <Rectangle Height="100" Color="Blue" />
                    <Rectangle Height="100" Color="Red" />
                    <Rectangle Height="100" Color="Blue" />
                    <Rectangle Height="100" Color="Red" />
                    <Rectangle Height="100" Color="Blue" />
                    <Rectangle Height="100" Color="Red" />
                </StackPanel>
            </DockPanel>
        </ScrollView>
    </DockPanel>
</App>

```

---

<div class="post-metadata">

**Author:** ![Mitnick](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Mitnick](https://forums.fusetools.com/u/Mitnick)\
**Post date:** [August 13, 2016, 9:19am UTC](https://forums.fusetools.com/t/scrollview-within-stackpanel-no-full-scroll/4757/3 "2016-08-13T09:19:39Z")

</div>

Again thank you very much Edwin Reynoso! 🙂

This solved my problem.
