views:

628

answers:

1

I wish to use a Grid for my top level layout. The Grid will have 1 column and n rows. Each row in the Grid should also contain a Grid which shall have 3 columns and 1 row. In the second column is a GridSplitter and I am trying to use a SharedSizeGroup so that this changes the size of the first column across all of the nested Grids.

Here is what i have...and it works!!...well kind of...if you click the splitter and resize without letting go it works...but for some reason if you resize something and let go of the mouse and then attempt to resize using a different row it seems to "stick".

Any ideas?

<!-- Parent Grid -->
<Grid Grid.IsSharedSizeScope="True">
    <Grid.RowDefinitions>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
    </Grid.RowDefinitions>

    <!-- First Grid -->
    <Grid Grid.Row="0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition SharedSizeGroup="A" Width="Auto"></ColumnDefinition>
            <ColumnDefinition SharedSizeGroup="B" Width="Auto"></ColumnDefinition>
            <ColumnDefinition SharedSizeGroup="C" Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <Label Grid.Column="0">One-Left</Label>
        <GridSplitter Grid.Column="1" Width="5" Background="DarkGray"></GridSplitter>
        <Label Grid.Column="2">One-Right</Label>
    </Grid>

    <!-- Second Grid -->
    <Grid Grid.Row="1">
        <Grid.ColumnDefinitions>
            <ColumnDefinition SharedSizeGroup="A" Width="Auto"></ColumnDefinition>
            <ColumnDefinition SharedSizeGroup="B" Width="Auto"></ColumnDefinition>
            <ColumnDefinition SharedSizeGroup="C" Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <Label Grid.Column="0">Two-Left</Label>
        <GridSplitter Grid.Column="1" Width="5" Background="DarkGray"></GridSplitter>
        <Label Grid.Column="2">Two-Right</Label>
    </Grid>

</Grid>
+1  A: 

I am able to repro this and, honestly, it looks like a bug. To be specific, if expand the width of the column in row one, I'm unable to reduce the width any further than that width another row. I'm going to try and play with this one some more, but... not sure what would fix that.

Drew Marsh
Thanks for replying. Thats what I was kinda thinking. It *seems* like it should work, and kinda does...but also totally doesn't. Its driving me nuts!!
fallenidol