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

  • Home
  • SEARCH
  • 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 6764277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:34:30+00:00 2026-05-26T14:34:30+00:00

I have DockPanel with ListView and StackPanel: <DockPanel Margin=5 LastChildFill=True> <ListView Margin=5 ItemsSource={Binding Source={StaticResource

  • 0

I have DockPanel with ListView and StackPanel:

<DockPanel Margin="5" LastChildFill="True">
    <ListView Margin="5" ItemsSource="{Binding Source={StaticResource taxGroupSource}}" DockPanel.Dock="Top" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
        <ListView.View>
            <GridView>
                <GridViewColumn Header="Last Name" DisplayMemberBinding="{Binding SerialNumber}" />
                <GridViewColumn Header="First Name" DisplayMemberBinding="{Binding Name}" />
            </GridView>
        </ListView.View>
    </ListView>
    <StackPanel DockPanel.Dock="Bottom" Style="{StaticResource buttonPanel}">
        <Button Content="Close" Click="CloseClick"/>
    </StackPanel>
</DockPanel>

When GridView have great rows count, ListView overlaps bottom StackPanel. Why?

  • 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-26T14:34:30+00:00Added an answer on May 26, 2026 at 2:34 pm

    I believe the issue is your LastChildFill on the DockPanel iteself. As explained by MSDN, LastChildFill makes it so that your StackPanel takes the remaining space in the DockPanel, even though you have set it to dock at the bottom. Try removing the attribute and seeing if that helps.

    Edit: Removing the attribute alone does not do it. I got the expected behavior by swapping the ListView and StackPanel, but that changes the tab order (although here it is only between two items so setting the focus to the ListView makes it look right).

    Alternately, can you use a grid with two rows–the ListView in the first row with a height of “*” and the StackPanel in the second with a height of “Auto”? Or is this a simplification of a more complex layout where that would not work?

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

Sidebar

Related Questions

I have the following custom Validation.ErrorTemplate: <Setter Property=Validation.ErrorTemplate> <Setter.Value> <ControlTemplate> <DockPanel LastChildFill=True> <Label DockPanel.Dock=Bottom
I have the following XAML: <DockPanel x:Name=OverViewContainer AllowDrop=True> <StackPanel Orientation=Horizontal DockPanel.Dock=Bottom HorizontalAlignment=Right> <uicommon:Toolbar DataContext={Binding
Here is the code I have : <ScrollViewer Grid.Row=2 CanContentScroll=True> <DockPanel> <TreeView x:Name=tView DockPanel.Dock=Top
I have a DockPanel with StackPanel rows. I need each StackPanel row to get
I have created a listbox control with following DataTemplate <DataTemplate x:Key=lb_Itemtemplate> <DockPanel> <TextBlock Text={Binding}
I have a simple template for a combobox structured in this way: <ComboBox DockPanel.Dock=Left
I have the following xaml: <DockPanel> <DockPanel.Resources> <Style TargetType=Button> <Style.Triggers> <Trigger Property=IsMouseOver Value=True> <Setter
I have a DockPanel with two Grids (DockPanel.Dock=Right/Left). In the left i have a
I have the following Grid . <Grid DockPanel.Dock=Bottom> <Border HorizontalAlignment=Stretch VerticalAlignment=Stretch CornerRadius=4 Background={DynamicResource {x:Static
I have an XAML tree as follows: <Window> <Grid> <DockPanel> <DataGrid> <DataGrid.Resources> <CheckBox Command={Binding

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.