View Revisions: Issue #1552

Summary 0001552: Sharing column or row sizes between grids with BaseDefinition.ShareSizeGroup does not work.
Revision 2019-09-09 14:23 by lupod
Steps To Reproduce Try the example from the .NET docs, it does not work: (https://docs.microsoft.com/en-us/dotnet/framework/wpf/controls/how-to-share-sizing-properties-between-grids)

Here is a simplified version of the code sample from the link above, but with the (in Noesis unsupported) Grid.ShowGridLines removed. And I removed the toggling logic.
This code does work flawlessly in Blend (design and runtime) but the same code does not work in Noesis for Unity.

Expected Result: The columns and row of the right grid should be resized to the corresponding sizes in the left grid.
Actual Result: No size sharing is happening when running in unity.

    <DockPanel Name="dp1" Grid.IsSharedSizeScope="True" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10">

        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">

            <Grid Margin="0,0,10,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition SharedSizeGroup="FirstColumn"/>
                    <ColumnDefinition SharedSizeGroup="SecondColumn"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" SharedSizeGroup="FirstRow"/>
                </Grid.RowDefinitions>

                <Rectangle Fill="Silver" Grid.Column="0" Grid.Row="0" Width="200" Height="100"/>
                <Rectangle Fill="Blue" Grid.Column="1" Grid.Row="0" Width="150" Height="100"/>

                <TextBlock Grid.Column="0" Grid.Row="0" FontWeight="Bold">First Column</TextBlock>
                <TextBlock Grid.Column="1" Grid.Row="0" FontWeight="Bold">Second Column</TextBlock>
            </Grid>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition SharedSizeGroup="FirstColumn"/>
                    <ColumnDefinition SharedSizeGroup="SecondColumn"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" SharedSizeGroup="FirstRow"/>
                </Grid.RowDefinitions>

                <Rectangle Fill="Silver" Grid.Column="0" Grid.Row="0"/>
                <Rectangle Fill="Blue" Grid.Column="1" Grid.Row="0"/>

                <TextBlock Grid.Column="0" Grid.Row="0" FontWeight="Bold">First Column</TextBlock>
                <TextBlock Grid.Column="1" Grid.Row="0" FontWeight="Bold">Second Column</TextBlock>
            </Grid>

        </StackPanel>
        
    </DockPanel>
Revision 2019-09-09 14:17 by lupod
Steps To Reproduce Try the example from the .NET docs, it does not work: (https://docs.microsoft.com/en-us/dotnet/framework/wpf/controls/how-to-share-sizing-properties-between-grids)

Here is a simplified version of the code sample from the link above, but with the (in Noesis unsupported) Grid.ShowGridLines removed. And I removed the toggling logic.

Expected Result: The columns and row of the right grid should be resized to the corresponding sizes in the left grid. This does work flawlessly in Blend (design and runtime).
Actual Result: No size sharing is happening when running in unity.

    <DockPanel Name="dp1" Grid.IsSharedSizeScope="True" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10">

        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">

            <Grid Margin="0,0,10,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition SharedSizeGroup="FirstColumn"/>
                    <ColumnDefinition SharedSizeGroup="SecondColumn"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" SharedSizeGroup="FirstRow"/>
                </Grid.RowDefinitions>

                <Rectangle Fill="Silver" Grid.Column="0" Grid.Row="0" Width="200" Height="100"/>
                <Rectangle Fill="Blue" Grid.Column="1" Grid.Row="0" Width="150" Height="100"/>

                <TextBlock Grid.Column="0" Grid.Row="0" FontWeight="Bold">First Column</TextBlock>
                <TextBlock Grid.Column="1" Grid.Row="0" FontWeight="Bold">Second Column</TextBlock>
            </Grid>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition SharedSizeGroup="FirstColumn"/>
                    <ColumnDefinition SharedSizeGroup="SecondColumn"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" SharedSizeGroup="FirstRow"/>
                </Grid.RowDefinitions>

                <Rectangle Fill="Silver" Grid.Column="0" Grid.Row="0"/>
                <Rectangle Fill="Blue" Grid.Column="1" Grid.Row="0"/>

                <TextBlock Grid.Column="0" Grid.Row="0" FontWeight="Bold">First Column</TextBlock>
                <TextBlock Grid.Column="1" Grid.Row="0" FontWeight="Bold">Second Column</TextBlock>
            </Grid>

        </StackPanel>
        
    </DockPanel>
Revision 2019-09-09 14:16 by lupod
Steps To Reproduce Try the example from the .NET docs, it does not work: (https://docs.microsoft.com/en-us/dotnet/framework/wpf/controls/how-to-share-sizing-properties-between-grids)

Here is a simplified version of the code sample from the link above, but with the (in Noesis unsupported) Grid.ShowGridLines removed. And I removed the toggling logic.

Expected Result: The columns and row of the right grid should be resized to the corresponding sizes in the left grid. This does work flawlessly in Blend (design and runtime).
Actual Result: No size sharing is happening when running in unity.