Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6348903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:30:42+00:00 2026-05-24T21:30:42+00:00

I have a StackPanel and for some reason I can’t get the content of

  • 0

I have a StackPanel and for some reason I can’t get the content of the ScrollViewer on the very bottom to be scrollable, despite the fact that the internal height of the Frame clearly exceeds the bounds of the ScrollViewer. I previously had a Grid as the root container of the Window, but when I changed it to StackPanel the scrollbar no longer appears.

The only thing that seems to work is if I explicitly set the height of the ScrollViewer, but then it does not size with thw Window when it’s resized.

Do I have to use a Grid?

Sorry if this is obvious; I’m relatively new to WPF.

Thanks in advance for any help!

<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         d:DesignWidth="566" Width="719" >

    <StackPanel VerticalAlignment="Stretch"  >
        <Menu HorizontalAlignment="Stretch" Name="Menu1" VerticalAlignment="Stretch" Width="Auto">
            <MenuItem Header="_File" Name="MenuItem1">
                <MenuItem Header="_Print" Name="MenuItem2" />
            </MenuItem>
        </Menu>

        <Canvas x:Name="SearchCanvas"  Width="681" Height="55">
            <ComboBox Canvas.Left="6" Canvas.Top="0" Height="22" x:Name="cbLookupField" Width="302" Text="" SelectedIndex="0">
                <ComboBoxItem Content="Reference Name" />
                <ComboBoxItem Content="Matter" />
                <ComboBoxItem Content="Client Loan Number" />
            </ComboBox>
            <TextBox KeyDown="tbLookup_KeyDown" Canvas.Left="6" Canvas.Top="28" Height="23" x:Name="tbLookup" Width="302" />

            <Button Canvas.Left="314" Canvas.Top="27" Content="Search" Height="24" Name="btnSearch" Width="106" />

            <ListView MouseDoubleClick="lvSearchResults_MouseDoubleClick" 
                      ItemsSource="{Binding Tables[0]}"  
                      Canvas.Left="-8" Canvas.Top="57" Height="129" Name="lvSearchResults" Width="697" Visibility="Hidden">
                <ListView.View>
                    <GridView x:Name="gvResultsGridView"/>
                </ListView.View>
            </ListView>
        </Canvas>

        <ScrollViewer  x:Name="ScrollViewer1" VerticalScrollBarVisibility="Visible">
            <Frame Height="Auto" Source="Full Report.xaml" VerticalAlignment="Stretch" x:Name="Frame1" />
        </ScrollViewer>
    </StackPanel>
</Window>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:30:43+00:00Added an answer on May 24, 2026 at 9:30 pm

    The ScrollViewer in the bottom does not have a fixed height, and therefore because it’s contained in a StackPanel, its height will be the height of the content, which in this case is the Frame height.

    You can either set a fixed height for the ScrollViewer, or use a Grid instead of a StackPanel. In case you use a grid you should set a fixed height for the row in which the ScrollViewer will be located.

    Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stackpanel with some usercontrols that are added or removed during runtime.
I have a StackPanel inside of a ScrollViewer. I have a slider that does
I have almost tried everything but for some reason it is not working <StackPanel
I have a listbox that I'm doing some databinding. As you can see I
I have a WPF StackPanel that looks like this: (some attributes removed that don't
I have some code that dynamically add button to StackPanel. I want to do
Given that we have the following View: <StackPanel> <TextBlock Text=Some text/> <Image Source={Binding vmImageProp}
I have the following situation: A stackpanel contains a number of elements, including some
I have a Stackpanel and want that the items automatically set their sizes regarding
In WPF 3.5 (with SP1), I have simply StackPanel that I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.