nerdexam
Microsoft

70-355 · Question #28

Drag and Drop Question You are developing a Universal Windows Platform (UWP) app. You need to create a grid that has three rows and two columns. The grid must contain a button located at the first…

The solution involves constructing a XAML Grid layout as follows: ``xml <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="" />…

Implement coding patterns

Question

Drag and Drop Question You are developing a Universal Windows Platform (UWP) app. You need to create a grid that has three rows and two columns. The grid must contain a button located at the first row and the second column. How should you complete the code? To answer, drag the appropriate code elements to the correct targets. Each element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

Explanation

The solution involves constructing a XAML Grid layout as follows:

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
  </Grid.RowDefinitions>
  <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*" />
    <ColumnDefinition Width="*" />
  </Grid.ColumnDefinitions>
  <Button Content="A button"
          Grid.Row="0"
          Grid.Column="1"
  />
</Grid>

From the 'Code Elements' list, '0' is used for Grid.Row and '1' is used for Grid.Column for the button placement. The RowDefinitions are defined with three <RowDefinition Height="Auto" /> elements, and ColumnDefinitions with two <ColumnDefinition Width="*" /> elements.

Topics

#UWP#XAML#Grid#layout

Community Discussion

No community discussion yet for this question.

Full 70-355 Practice