Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following XAML code fragment.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="0">Left</Button>
<Button Grid.Column="2">Right</Button>
</Grid>

You need to perform the following tasks:
* Ensure that the columns that hold the Button controls can be resized by dragging a line between them.
* Ensure that only a space of 5 device-independent pixels remains between the two Button controls.
Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following XAML code fragment.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="0">Left</Button>
<Button Grid.Column="2">Right</Button>
</Grid>

You need to perform the following tasks:
* Ensure that the columns that hold the Button controls can be resized by dragging a line between them.
* Ensure that only a space of 5 device-independent pixels remains between the two Button controls.
Which XAML code fragment should you use?

A.
<GridSplitter Grid.Column="1" Width="5" />

B.
<GridSplitter Grid.Column="1" Grid.RowSpan="2" Width="5" />

C.
<GridSplitter Grid.Column="1" ResizeBehavior="PreviousAndNext" Width="5" />

D.
<GridSplitter Grid.Column="1" ResizeBehavior="PreviousAndCurrent" Width="5" />



Leave a Reply 0

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