ScrollViewer Height

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)

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

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.

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

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