Repository navigation
Closed
Labels
area/gridCategorizes an issue or PR as relevant to the Grid paneldifficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.hacktoberfestComplete the Hacktoberfest challenge and earn something special each year.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugSomething isn't workingkind/regressionSomething was working, now it isn'tplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformplatform/ios 🍎Categorizes an issue or PR as relevant to the iOS platformplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platformproject/layout 🧱Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
Description
Bug Report
Take the following XAML:
<Border Width="350" Height="350" BorderBrush="Red" BorderThickness="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="150" />
<ColumnDefinition MinWidth="150" />
<ColumnDefinition MinWidth="150" />
</Grid.ColumnDefinitions>
<Rectangle Grid.Column="0" Fill="LightBlue" />
<Rectangle Grid.Column="1" Fill="LightGreen" />
<Rectangle Grid.Column="2" Fill="LightGray" />
<TextBlock Grid.ColumnSpan="2" FontWeight="Bold" FontSize="20" TextWrapping="WrapWholeWords" Padding="10">
3 columns of MinWidth=150 in a 350px wide border (red border)
- they should be aligned with central darker rectangles.
</TextBlock>
<StackPanel Height="40" Grid.ColumnSpan="3" VerticalAlignment="Center" Orientation="Horizontal">
<Rectangle Width="150" Fill="Blue" />
<Rectangle Width="150" Fill="Green" />
<Rectangle Width="150" Fill="Gray" />
</StackPanel>
</Grid>
</Border>Current behavior
It's crashing the app on all Uno platforms.
Last rectangle isn't clipped.
Expected behavior
Shoud render corectly, following the rules described in it. Content should be clipped.
Affected platform(s):
- iOS
- Android
WebAssembly
Sample
The sample Grid_with_MinWidthColumns illustrate the problem well.
Regression
It's a regression because it's not crashing on the playground: https://playground.platform.uno/#ad18ce45 (but not rendered correctly)
Reacted by Agnès ZITTE
Metadata
Metadata
Assignees
Labels
area/gridCategorizes an issue or PR as relevant to the Grid paneldifficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.hacktoberfestComplete the Hacktoberfest challenge and earn something special each year.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugSomething isn't workingkind/regressionSomething was working, now it isn'tplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformplatform/ios 🍎Categorizes an issue or PR as relevant to the iOS platformplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platformproject/layout 🧱Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
Activity
kazo0 commentedon Oct 20, 2019
For what it's worth, I am unable to repro this crash on any platform with latest
masterSamplesApp. Only thing I notice is that nothing seems to render for the WASM sample.kazo0 commentedon Oct 20, 2019
I did notice that the grid isn't being clipped on Android
davidjohnoliver commentedon Dec 19, 2019
Confirmed that the clipping is incorrect on Android and iOS (but correct on WASM).
Seems that UWP gives the Grid a DesiredSize <= than the outer Border size, but the ActualWidth is wider than the outer Border.
[-]Using MinWidth on Grid's ColumnDefinition could crash the app[/-][+][Android] [iOS] Grid with MinWidths summing to greater than container Width isn't clipped[/+]carldebilly commentedon Feb 4, 2020
It has not been tested yet, but the package Uno.UI v
2.1.0-dev.1090contains fixes related to this issue and it should be tested again on this version.Adjust sample for issue #1885 #1885