Repository navigation
Closed
Labels
area/xf-wasm-renderersCategorizes an issue or PR as relevant to WebAssembly Renderers for Xamarin Formsgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/bugSomething isn't workingplatform/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 platformtriage/untriagedIndicates an issue requires triaging or verification
Description
Current behavior
The default alignment of the ViewBox is top-left
Expected behavior
The default alignment of the ViewBox should be center-center
How to reproduce it (as minimally and precisely as possible)
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Viewbox Grid.ColumnSpan="2" Stretch="None">
<Border Width="100" Height="100" Background="DeepSkyBlue">
<TextBlock Text="Default" />
</Border>
</Viewbox>
<Viewbox Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Left" Stretch="None">
<Border Width="100" Height="100" Background="#FF69B4">
<TextBlock Text="ViewBox top-left" TextWrapping="Wrap" />
</Border>
</Viewbox>
<Viewbox Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Right" Stretch="None">
<Border Width="100" Height="100" Background="#FF0000" Margin="0,0,1,1">
<TextBlock Text="ViewBox top-right" TextWrapping="Wrap" />
</Border>
</Viewbox>
<Viewbox Grid.Row="2" Grid.Column="0" VerticalAlignment="Bottom" HorizontalAlignment="Left" Stretch="None">
<Border Width="100" Height="100" Background="#FF8E00" Margin="0,0,1,1">
<TextBlock Text="ViewBox bottom-left" TextWrapping="Wrap" />
</Border>
</Viewbox>
<Viewbox Grid.Row="2" Grid.Column="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Stretch="None">
<Border Width="100" Height="100" Background="#FFFF00" Margin="0,0,1,1">
<TextBlock Text="ViewBox bottom-right" TextWrapping="Wrap" />
</Border>
</Viewbox>
<Viewbox Grid.Row="3" Grid.Column="0" Stretch="None">
<Border Width="100" Height="100" Background="#008E00" VerticalAlignment="Top" HorizontalAlignment="Left">
<TextBlock Text="Child top-left" TextWrapping="Wrap" />
</Border>
</Viewbox>
<Viewbox Grid.Row="3" Grid.Column="1" Stretch="None">
<Border Width="100" Height="100" Background="#00C0C0" VerticalAlignment="Top" HorizontalAlignment="Right">
<TextBlock Text="Child top-right" TextWrapping="Wrap" />
</Border>
</Viewbox>
<Viewbox Grid.Row="4" Grid.Column="0" Stretch="None">
<Border Width="100" Height="100" Background="#400098" VerticalAlignment="Bottom" HorizontalAlignment="Left">
<TextBlock Text="Child bottom-left" TextWrapping="Wrap" />
</Border>
</Viewbox>
<Viewbox Grid.Row="4" Grid.Column="1" Stretch="None">
<Border Width="100" Height="100" Background="#8E008E" VerticalAlignment="Bottom" HorizontalAlignment="Right" >
<TextBlock Text="Child bottom-right" TextWrapping="Wrap" />
</Border>
</Viewbox>
</Grid>Android:
UWP:
Environment
Nuget Package: Uno.UI
Package Version(s): 2.0
Affected platform(s):
- [?!] iOS
- Android
- [?!] WebAssembly
- [?!] WebAssembly renderers for Xamarin.Forms
- Windows
- Build tasks
- Solution Templates
Visual Studio: irrelevant
Relevant plugins: none
Anything else we need to know?
I will commit this sample as ViewBox_Alignment
Reacted by Agnès ZITTE
Metadata
Metadata
Assignees
Labels
area/xf-wasm-renderersCategorizes an issue or PR as relevant to WebAssembly Renderers for Xamarin Formsgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/bugSomething isn't workingplatform/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 platformtriage/untriagedIndicates an issue requires triaging or verification


Activity
dr1rrb commentedon Dec 4, 2019
Fixed ... commit coming soon