Microsoft TS: Windows Applications Development with Microsoft .NET Framework 4 Sample Questions:
1. You are developing a Windows Presentation Foundation (WPF) application.
You need to display HTML content from a Web page on the WPF form.
What should you do?
A) Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.
B) Add a DocumentViewer control to the design surface. Then create a FixedDocument control.
C) Add a ContentControl control to the design surface. Then reference a WebClient object to return an HTML string.
D) Add a WebBrowser control to the design surface. Then use the Navigate method to navigate the URI object.
2. 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?
A) <DockPanel>
<Button Content="Left"/>
<Button Content="Top" DockPanel.Dock="Top">
<Button Content="Bottom" DockPanel.Dock="Bottom"/>
<Button Content="Center"/>
</DockPanel>
B) <DockPanel>
<Button Content="Top" DockPanel.Dock="Top"/>
<Button Content="Left"/>
<Button Content="Center'7>
<Button Content="Bottoiti" DockPanel. Dock="Bottoinr7>
</DockPanel>
C) <DockPanel>
<Button Content="Leftp7>
<Button Content="Top" DockPanel.Dock="Top"/>
<Button Content="Center">
<Button Content="Bottom" DockPanel. Dock="Bottom">
</DockPanel>
D) <DockPanel>
<Button Content="Top" DockPanel.Dock="Top"/>
<Button Content="Bottom" DockPanel. Dock="Bottom">
<Button Content="Left"/>
<Button Content="Center'7>
</DockPanel>
3. You are developing a Windows Presentation Foundation (WPF) application. You have a class named Orders, which contains OrderId and ShipOn properties. You place a control in the MainWindow.xaml file, as follows. (Line numbers are included for reference only.)
When you run the application, the ComboBox control displays the class name for every row.
You need to ensure that the ComboBox control displays the Orderld and ShipOn values in columns.
Which markup segment should you add at line 03?
A) <ItemsControlTemplate>
<Datatemplate>
<Grid>
<TextB1ock Text="{Binding OrderId}"/>
<TextB1ock Text="{Bindmg ShipOn}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
B) <ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.ColumnDefinltions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColunmDefinitions>
<TextBlock Grid.Column="0" Text="{Binding OrderId}"/>
<TextBlock Grid.Column="1" Text="{Binding ShipOn}"/>
</Grid>
</IcemsPanelTemplate>
</ItemsControl.ItemsPanel>
C) <ItemsControl.ItemTemplate>
<BataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<CoIumnDefinltion />
</Grid.CoIumnDefinitions>
<TexcBlock Grid.Column""0" Text-"{Binding OrderId}"/>
<TextB1ock Grid.Column="1" Text= Text="{Binding ShipOn}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
D) <ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<TextB1ock Text="{Binding OrderId}"/>
<TextB1ock Text="{Binding ShipOn}"/>
</Grid>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
4. You are developing a Windows Presentation Foundation (WPF) application that displays pricing and inventory Information.
A list box's ItemsSource property has decimal and string types. Decimals represent price and strings represent messages such as "Discontinued"
The following markup is defined as follows. (Line numbers are included for reference only.)
You need to ensure that data templates are used to format the strings without changes and the decimals as currency.
Which markup segment should you insert at line 05?
A) <DataTemplate DataType="{x:Type clr:String} ,/>
<TextBlock
Text="{ Binding StringFormat=Item Error: {0}}" />
</DataTemplate>
<DataTemplate DataType="{x:Type clr:Decimal) ">
<TextBlock
Text="{Binding StringFormat=Item Price: {0:C}}" />
</DataTemplate>
B) <DataTemplate DataType=,clr : String">
<TextBlock
Text="{Binding StringFormat=Item Error: {0}}" />
</DataTemplate>
<DataTernplate DataType="clr: Decimal">
<TextBlock
Text="{Binding StringFormat=Item Price: {0: C}}" />
</DataTemplate>
C) <DataTemplate x:Key="clr:String">
<TextBlock
Text="{Binding StringFormat=Itein Error: {0}}"/>
</DacaTeroplate>
<DataTeroplate x:Key="clr:Decirrtal">
<TextBlock
Text="{Binding StringForroat=Item Price: {0:C}}" />
</DataTemplate>
D) <DataTemplate x:Key="String" Template="clr:String">
<TextBlock
Text="{Binding StringFormat=Item Error: {0}}" />
</DataTemplate>
<DataTemplate x:Key="Decimal" Template="clr:Decimal ">
<TextBlock
Text="{Binding StringFormat=Item Price: {0:C}}" />
</DataTemplate>
5. You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You need to ensure that users can view content in a book-reading format that displays two pages at a time.
Which control should you use?
A) FlowDocument
B) FlowDocumentReader
C) FlowDocumentScrollViewer
D) FlowDocumentPageviewer
Solutions:
| Question # 1 Answer: D | Question # 2 Answer: D | Question # 3 Answer: C | Question # 4 Answer: D | Question # 5 Answer: B |














1286 Customer Reviews
Quality and ValueITCertKing Practice Exams are written to the highest standards of technical accuracy, using only certified subject matter experts and published authors for development - no all study materials.
Tested and ApprovedWe are committed to the process of vendor and third party approvals. We believe professionals and executives alike deserve the confidence of quality coverage these authorizations provide.
Easy to PassIf you prepare for the exams using our ITCertKing testing engine, It is easy to succeed for all certifications in the first attempt. You don't have to deal with all dumps or any free torrent / rapidshare all stuff.
Try Before BuyITCertKing offers free demo of each product. You can check out the interface, question quality and usability of our practice exams before you decide to buy.
