Reputation: 18873
I am making windows 8 app in c#. Are there any attributes in Xaml that makes a items in toolbox
layout_width="match_parent"
layout_height="wrap_content"
like in android xml? Thanks in advance.
Upvotes: 2
Views: 362
Reputation: 19897
In xaml, if you make a grid with rows like this:
<Grid>
<Grid.RowDefinitions>
<RowDefintion Width="*"/>
<RowDefintion Width="Auto"/>
</Grid.RowDefinitions>
</Grid>
Rows that have Auto
Width
resize to fit their contents. Rows that have *
Width
equally share the available space with other *
Width
Columns. To create an item that fills its container, simply put the control in a *
row and column and set the HorizontalAlignment
and VerticalAlignment
on the control to Stretch
.
To get a control that wraps to the next line, simply use a WrapGrid
.
Upvotes: 1