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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:14:28+00:00 2026-05-19T03:14:28+00:00

I have a user control, call it UserControl , that has a grid with

  • 0

I have a user control, call it UserControl, that has a grid with the following column definitions:

<Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" SharedSizeGroup="A"/>
            <ColumnDefinition Width="Auto" SharedSizeGroup="B"/>
            <ColumnDefinition Width="*" SharedSizeGroup="C"/>
            <ColumnDefinition Width="Auto" SharedSizeGroup="D"/>
            <ColumnDefinition MinWidth="30" Width="*" SharedSizeGroup="E"/>
            <ColumnDefinition MinWidth="30" Width="*" SharedSizeGroup="F"/>
            <ColumnDefinition Width="110" SharedSizeGroup="G"/>
            <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="H"/>
            <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="I"/>
            <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="J"/>
            <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="K"/>
            <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="L"/>
</Grid.ColumnDefinitions>

I also have MainWindow, which contains a grid itself, with the following property defined on the grid:

Grid.IsSharedSizeScope="True"

Now, I added a couple of UserControls to the grid in MainWindow (each to a separate row). My goal is to have each of the column widths of the different UserControls to remain in sync. Everything works fine when using SharedSizeGroup except for one thing. It seems that any column with a Width of * does not behave as it should. It looks like the * column widths are set as if they were Auto instead.

Are there any limitations/issues with SharedSizeGroup and * sizing? This seems like the best way to keep the column widths in sync but I can’t seem to fix this.

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-19T03:14:29+00:00Added an answer on May 19, 2026 at 3:14 am

    DefinitionBase.SharedSizeGroup Property (Microsoft Docs):

    Columns and rows that participate in
    size-sharing do not respect Star
    sizing. In the size-sharing scenario,
    Star sizing is treated as Auto

    If you use star then all columns would be the same width, so you should assign the same SharedSizeGroup to all if you do not mind the auto-sizing aspect:

    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" SharedSizeGroup="A"/>
        <ColumnDefinition Width="Auto" SharedSizeGroup="B"/>
        <ColumnDefinition Width="*" SharedSizeGroup="StarDontWork"/>
        <ColumnDefinition Width="Auto" SharedSizeGroup="D"/>
        <ColumnDefinition MinWidth="30" Width="*" SharedSizeGroup="StarDontWork"/>
        <ColumnDefinition MinWidth="30" Width="*" SharedSizeGroup="StarDontWork"/>
        <ColumnDefinition Width="110" SharedSizeGroup="G"/>
        <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="H"/>
        <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="I"/>
        <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="J"/>
        <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="K"/>
        <ColumnDefinition MinWidth="30" Width="Auto" SharedSizeGroup="L"/>
    </Grid.ColumnDefinitions>
    

    (From this behavior it also follows that you can drop the Width property when SharedSizeGroup is set)


    You can deduce that if all auto-sizing columns are in shared size groups then all star-sizing columns will have the same sizes as every grid in scope will have the same amount of unused space left that will be distributed to the star-sized columns.

    A simple example:

    <Grid.ColumnDefinitions>
        <ColumnDefinition SharedSizeGroup="A"/>
        <ColumnDefinition SharedSizeGroup="B" Width="*"/>
        <ColumnDefinition SharedSizeGroup="C"/>
    </Grid.ColumnDefinitions>
    

    As explained the Width="*" will not do anything, but as columns 0 and 2 are synched, column 1 has to be synched as well so you can just drop the SharedSizeGroup:

    <Grid.ColumnDefinitions>
        <ColumnDefinition SharedSizeGroup="A"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition SharedSizeGroup="C"/>
    </Grid.ColumnDefinitions>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control that has 5 rectangle shapes in it. I would
I have created a user control UserVote that has property to find total vote
I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have a user control in a repeater that I need to pass data
I have a user control that is pretty basic. It contains several TextBox controls,
I have a user control that I'm building. It's purpose is to display the
I have a user control that needs to load a child control when a
I have a Control that can overlay multiple C# user controls in my GUI.
I have User Control <table style=border-width: 0> <tr> <td style=vertical-align: middle;> <asp:RadioButton ID=rdOption runat=server
In a WPF UserControl, I have to make to call to a WebService. I

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.