# ScrollViewer Height

**URL:** <https://forums.fusetools.com/t/scrollviewer-height/2845>\
**Category:** How-to Discussions\
**Created:** [May 5, 2015, 2:28am UTC](https://forums.fusetools.com/t/scrollviewer-height/2845 "2015-05-05T02:28:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [May 5, 2015, 2:28am UTC](https://forums.fusetools.com/t/scrollviewer-height/2845/1 "2015-05-05T02:28:33Z")

</div>

Hi, there is anyway to make a ScrollViewer that his Height reaches the bottom of the screen? Or his HeightUnit in percent is based on the screen Height not his parent? I have a ScrollViewer inside of a StackPanel and when I put a Percent Height doesn’t show…

Like this example: (I want that after the Rectangle the ScrollViewer reaches the bottom of the screen but doesn’t work and the ScrollViewer have no Height)

```auto
<App Theme="Basic">
    <StackPanel Orientation="Vertical">
        <Rectangle Height="100" WidthUnit="Percent" Width="100">
            <SolidColor Color="#000" />
        </Rectangle>
        <ScrollViewer Background="Red" HeightUnit="Percent" Height="100" WidthUnit="Percent" Width="100">
        </ScrollViewer>
    </StackPanel>
</App>

```

---

<div class="post-metadata">

**Author:** ![edA-qa\_mort-ora-y](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/eda-qa_mort-ora-y/32/124_2.png) [@edA-qa\_mort-ora-y](https://forums.fusetools.com/u/edA-qa_mort-ora-y)\
**Post date:** [May 5, 2015, 5:26am UTC](https://forums.fusetools.com/t/scrollviewer-height/2845/2 "2015-05-05T05:26:11Z")

</div>

This isn’t working since you are attempting to stretch in the direction of the `StackPanel` layout. A `StackPanel` can be used to get similar effects but in your case you’ll likely be better off using a `DockPanel`.

```auto
<DockPanel>
    <Rectangle DockPanel.Dock="Top" Height="100">
        <SolidColor Color="#000" />
    </Rectangle>
    <ScrollViewer Background="Red">
    </ScrollViewer>
</DockPanel>

```

The `ScrollViewer` here will expand to take up whatever space is left in the `DockPanel`.
