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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:56:25+00:00 2026-06-03T06:56:25+00:00

I have one grid that has 14 columns. If I place another grid of

  • 0

I have one grid that has 14 columns. If I place another grid of 28 columns in first column of first grid and span it by 14 it split every column on two parts. But if I create grid of 42 columns(3×14) it doesn’t split every column on three eaqul parts.

This one works:
enter image description here

This doesn’t work (not equally split):
enter image description here

<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SilverlightApplication1.MainPage"
Width="640" Height="480">
<Grid x:Name="LayoutRoot" Background="White">
    <Grid x:Name="AllWhiteKeys" Margin="0,0,0,200">         
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Rectangle Name="WhiteKey1" Grid.RowSpan="3" Grid.Column="0" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey2" Grid.RowSpan="3" Grid.Column="1" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey3" Grid.RowSpan="3" Grid.Column="2" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey4" Grid.RowSpan="3" Grid.Column="3" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey5" Grid.RowSpan="3" Grid.Column="4" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey6" Grid.RowSpan="3" Grid.Column="5" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey7" Grid.RowSpan="3" Grid.Column="6" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey8" Grid.RowSpan="3" Grid.Column="7" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey9" Grid.RowSpan="3" Grid.Column="8" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey10" Grid.RowSpan="3" Grid.Column="9" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey11" Grid.RowSpan="3" Grid.Column="10" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey12" Grid.RowSpan="3" Grid.Column="11" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey13" Grid.RowSpan="3" Grid.Column="12" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>
        <Rectangle Name="WhiteKey14" Grid.RowSpan="3" Grid.Column="13" Fill="White" StrokeThickness="1" Stroke="Black" RadiusX="8" RadiusY="8"/>

        <Grid Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="14">
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>

                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>

                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
        </Grid>
    </Grid>
    </Grid>

  • 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-03T06:56:27+00:00Added an answer on June 3, 2026 at 6:56 am

    That is simply a rounding error.

    Your total width is 640, divided into 42 columns is 15.23 pixels each, but the columns round to the nearest pixel as they count across, so the columns creep back and forth slightly.

    If you change the design width to a multiple of 42 (e.g. 630) it goes away. See sample below (630 * 480):

    enter image description here

    As @Joe White mentions you can turn off the rounding using UseLayoutRounding, but as you want it to be crisp and clear you need to start thinking pixel-based dimensions (like the good days of early video game development).

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

Sidebar

Related Questions

So I have a ExtJs 4 Grid Panel that has two columns. Column ONE
I have a grid that has multiple rows. I want to hide/show one of
In my application I have a Grid that is divided in two columns: instance_room[room_guid].Room_grid.ColumnDefinitions.Add(new
I have a table that has two columns both of them are continuous data.
I have a dojox.grid.DataGrid, and one of the columns has date data in it.
I need to have a grid on one of my webpages that will be
I have a Grid which contains an Image in one of its columns. The
I have two grid, one with auto-generated fields and the other not. how can
I have a ListBox that has a grid in its template to allow 4
I have a Grid as a root container with two columns defined (There's only

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.