Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You plan to define three columns for a Grid control.
You need to ensure that the column definition meets the following requirements:
* The central column is twice as wide as the side columns.
* The columns occupy all the available horizontal space.
Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You plan to define three columns for a Grid control.
You need to ensure that the column definition meets the following requirements:
* The central column is twice as wide as the side columns.
* The columns occupy all the available horizontal space.
Which XAML code fragment should you use?

A.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
</Grid>

B.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
</Grid>

C.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1" />
<ColumnDefinition Width="2" />
<ColumnDefinition Width="1" />
</Grid.ColumnDefinitions>
</Grid>

D.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="25" />
</Grid.ColumnDefinitions>
</Grid>



Leave a Reply 0

Your email address will not be published. Required fields are marked *