Exam 70-511 : Windows Applications Development with Microsoft .NET Framework 4 Part – 5

Question: You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that allows users to arrange images. You need to ensure that users can arrange child elements in a panel without affecting the size of the elements. You also need to ensure that child elements are oriented horizontally. Which control should you use?

  1. ListBox
  2. DockPanel
  3. WrapPanel
  4. StackPanel

Correct Answer: 4


Question: You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that the application meets the following requirements:

  • Displays a menu that is specific to the control selected by the user.
  • Displays the menu next to the control.

Which control should you use?

  1. Menu
  2. PopUp
  3. ListBox
  4. ContextMenu

Correct Answer: 4


Question: You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that displays an image. You need to ensure that users can stretch and scale the image. Which control should you use?

  1. Frame
  2. Slider
  3. Viewbox
  4. ScrollViewer

Correct Answer: 3


Question: You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a window as shown in the following exhibit. You need to define a DockPanel control that fits the window. Which code fragment should you use?

  1. <DockPanel>
    <Button Content="Left"/>
    <Button Content="Top" DockPanel.Dock="Top"/>
    <Button Content="Bottom" DockPanel.Dock="Bottom"/>
    <Button Content="Center"/>
    </DockPanel>
  2. <DockPanel>
    <Button Content="Top" DockPanel.Dock="Top"/>
    <Button Content="Bottom" DockPanel.Dock="Bottom"/>
    <Button Content="Left"/>
    <Button Content="Center"/>
    </DockPanel>
  3. <DockPanel> <Button Content="Left"/> <Button Content="Top" DockPanel.Dock="Top"/> <Button
    Content="Center"/<Button Content="Bottom" DockPanel.Dock="Bottom"/> </DockPanel>
  4. <DockPanel> <Button Content="Top" DockPanel.Dock="Top"/> <Button Content="Left"/> <Button
    Content="Center"/> <Button Content="Bottom" DockPanel.Dock="Bottom"/> </DockPanel>

Correct Answer: 2


Question: You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You plan to create a window that has a layout as shown in the following exhibit. You need to define the code fragment to create the window layout. You also need to ensure that the window contains a splitter line. Which code fragment should you use?

  1. <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="50*" />
    <RowDefinition Height="50*" />
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0">
    <Button>Item1</Button>
    <Button>Item2</Button>
    </StackPanel>
    <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Center" ShowsPreview="True" Height="2" />
    <TextBlock Grid.Row="1">Please, select an item</TextBlock>
    </Grid>
  2. <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="50*" />
    <RowDefinition Height="50*" />
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0">
    <Button>Item1</Button>
    <Button>Item2</Button>
    </StackPanel>
    <GridSplitter HorizontalAlignment="Center" VerticalAlignment="Stretch" ShowsPreview="True" Height="2" /> <TextBlock Grid.Row="1">Please, select an item</TextBlock>
    </Grid>
  3. <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="50*" />
    <RowDefinition Height="Auto*" />
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0">
    <Button>Item1</Button>
    <Button>Item2</Button>
    </StackPanel>
    <GridSplitter.Grid Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" ShowsPreview="True" Height="2" />
    <TextBlock Grid.Row="2">Please, select an item</TextBlock>
    </Grid>
  4. <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="50*" />
    <RowDefinition Height="Auto*" />
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0">
    <Button>Item1</Button>
    <Button>Item2</Button>
    </StackPanel>
    <GridSplitter.Grid Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" ShowsPreview="True" Height="2" />
    <TextBlock Grid.Row="2">Please, select an item</TextBlock>
    </Grid>

Correct Answer: 3

Tagged . Bookmark the permalink.

Leave a Reply