Im new here and Im quite a noob in xaml, but here's what I'd like to do : get 2 columns and split the 1st column in 2 rows.
I think that the base is : (I want the 2nd column to be a bit larger开发者_Python百科)
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
but then I don't manage to split the 1st column :/ I tried :
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
but I can't specify that this definition is only for the 1st column (Grid.Column attribute unavailable in RowDefinition)
You dont split rows/columns but rather tell content to be placed above more than one colum to be spanned. Check the Grid.ColumnSpan or Grid.RowSpan properties.
So basically what you want to do is take what you started, define two rows and two columns and then specify that the the UIElement in the second column shall span over both rows, e.g.
<Image Grid.RowSpan="2" Grid.Row="0" Grid.Column="1" />
I just accepted it, but in the end, I used the following code than did exactly what I wanted with the philosophy I build my interfaces with !
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40*"/>
<RowDefinition Height="60*"/>
</Grid.RowDefinitions>
</Grid>
</Grid>
精彩评论