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 6809557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:06:02+00:00 2026-05-26T20:06:02+00:00

I am working on a WPF application and using a scrollViewer to view the

  • 0

I am working on a WPF application and using a scrollViewer to view the content that is offlimit the screen area. Working fine, no issues.

But if my window contains a Listbox or Grid or anything like that and that control has many records then instead of adding a scrollbar to itself, it just increase the height of the control and window itself because scrollviewer believes it needs to extend.

I don’t want to hardcode the listbox’s height, because that make it same in different resolutions, i want to make it increase its height but not always as scrollviewer make it do so.

Thanks

  • 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-26T20:06:03+00:00Added an answer on May 26, 2026 at 8:06 pm

    You can’t include a variable height/width object inside a ScrollViewer without setting the height/width of the viewer.

    The scroll viewer effectively has infinite height so the grid expands to fill the “available” space – hence the effect you are seeing. As @JoeWhite says in his comments, the ScrollViewer is a container that can be as tall as it needs to be to hold all of its content. Anchoring wouldn’t help – in effect, your ListBox already is anchored, it’s just anchored to something that says “oh, I’ll be whatever size you need me to be”.

    You’ll need to either restrict the height, move the ListBox outside the ScrollViewer or use something other than a ScrollViewer.

    Again quoting @Joe “These are the hazards of putting a scrolling area inside another scrolling area – it’s poor usability and it’s hard to define the behaviour.”

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

Sidebar

Related Questions

I'm working on a WPF application and is using the Model-View-ViewModel pattern. The application
I am working on a WPF application with MVVM, but am not using any
I'm working on a WPF application that has no main window (it runs in
I am working with WPF application in that case I am using Google API
I'm working on a WPF application, and I'm structuring it using the MVVM pattern.
I'm working on writing a small application using the WPF MediaKit , and I
I'm working on a WPF application that sometimes exhibits odd problems and appears to
I am working on a WPF application which has a treeview that represents an
I am working on an WPF application that uses a BusinessLogic layer (currently a
I'm working on an WPF application using the mvvm-light framework. I'm new to both

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.