Does the StackGrid support the remainder operator (star)?

Nov 17, 2011 at 11:45 AM
Edited Nov 17, 2011 at 11:46 AM

I wanted to use the StackGrid for my application. However it is not working as I expected. When using a Grid without defining an width or height it uses the full size of the grid to fit the controls. However the StackGrid only appears to support the fixed size or autosize methods and the remainder "*" does not appear to be supported. Is this a limitation of the StackGrid?

Use the xaml below to reproduce the scenario:

            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="auto"/>

        <Label Content="1"/>
        <Label Grid.Column="1" Content="2"/>
        <Label Grid.Row="1" Content="3"/>
        <Label Grid.Row="1" Grid.Column="1" Content="4"/>

            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="auto"/>
        <Label Content="1"/>
        <Label Content="2"/>
        <Label Content="3"/>
        <Label Content="4"/>
Nov 17, 2011 at 6:33 PM

Thank you for the report. You are right, this is an issue and we just fixed it. You can download the latest source which contains the fix.

Nov 18, 2011 at 11:08 AM

For your convenience, I have updated the beta files:

Nov 18, 2011 at 11:11 AM

I had already downloaded the source and confirmed that the problem has been solved. Thanks for the quick fix though.