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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:39:29+00:00 2026-06-06T19:39:29+00:00

A novice at WPF / XAML, I’ve been wrestling with layout and trying to

  • 0

A novice at WPF / XAML, I’ve been wrestling with layout and trying to get it uniform. I’m using a listbox of grids, with different data in different columns. I’ll start by saying the desired behavior: uniform start and end positions for the columns, which I thought could be achieved by using *-based Widths in the ColumnDefinitions.

And in the most recent diff from the GitHub link at the bottom, with the dummy data, the columns are uniform with various string lengths. But for some reason when I use the actual data drawn from the DirectorySizers the uniformity goes out the window, where the second column starts at different positions based on the length of DirPath. The only thing I could think was if the data was somehow longer than the column, which doesn’t seem to be the case (inspecting in memory DirPath comes out appropriately trimmed).

Any solutions / explanations for this? I’m at a loss.

Diff between desired and undesired behavior

  • 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-06-06T19:39:31+00:00Added an answer on June 6, 2026 at 7:39 pm

    You should look into using Grid.IsSharedSizeScope on your listbox. Using this you can make all the grids share the same column size based on the property “SharedSizeGroup” in the columnDefinition. I know this isn’t a thorough explanation so please just google on Grid.IsSharedSizeScope and you find what you need.

    Also the diference in behaviour you see may be explained by the different structure of the data source you are using. Instead of doing an array of string where the exact same value gets bound to each column try setting up a class with two different string values and binding to that. That way it will be a more valid comparision to your DirectorySizer object

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

Sidebar

Related Questions

SQL novice here. I'm trying to get a list of invoice numbers. There are
I'm a novice WPF programmer. I'm trying to add some structure to my code:
I notice that many of the WPF MVVM frameworks seem to avoid using the
Python novice here. I am using python2.7.2 on Windows7. I have installed the PyWin32
As I'm a novice, I started learning python by writing simple programs using python
I'm novice in the GUI development, in particular with WPF, and don't know related
I am trying to create a WPF database application. There seems to be a
I'm binding a collection of objects to a listbox in WPF, for simplicity we'll
I have a WPF application in which I'm moving data around on a Canvas.
I am using the WPF webbrowser and basically when I load an external url,

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.