2014 Latest 100% Pass Guaranteed Microsoft 70-511 Practice Tests (41-50)

QUESTION 41
You are developing a Windows Presentation Foundation (WPF) application. The main window of the application is defined by the following markup.
<Grid ShoTJGridLines=”True”>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDeiinition />
</Grid.ColumnDef initions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RouDefinitions>
<TextBlock Grid.Row=”0″ HorizontalAlignment=”Center”> Products Shipped</TextBlock>
<TextBlock Grid.Row=”l” Grid.Column=”0″>
Quarter K/TextBlock>
<TextBlock Grid.Row=”2″ Grid.Column-“0”>
Quarter 2</TextBlock>
<TextBlock Grid.Row=”l” Grid.Coiumn=”l”>
50000</TextBiock>
<TextBlock Grid.Row=”2″ Grid.Coluitin=”l”>
150000</TextBlock>
</Grid>
When the application is run, it appears as follows?

image
You need to ensure that the TextBlock control with the contents “Products Shipped” is horizontally centered on the Grid control. Which markup segment should you add to the TextBlock control?

A.    GridView.ColumnCollection=”l,2″
B.    Grid.ColumnSpan=”2″
C.    Manipulation.ManipulationParameter””2″
D.    TextBlock.TextAlignment-“Center”

Answer: B

QUESTION 42
You are developing a Windows Presentation Foundation (WPF) application with the following class.
(Line numbers are included for reference only.)

image
The UI is not being updated when the Data property is set. You need to ensure that the DisplayData class correctly updates the UI when the Data property is set.
What should you do?

A.    Insert the following code at line 14.
NotifyPropertyChanged(“Data”);
B.    Insert the following code at line 16.
NotifyPropertyChanged(“Data”);
C.    Insert the following code at line 14.
NotifyPropertyChanged(value);
D.    Insert the following line at line 16.
NotifyPropertyChanged(value);

Answer: C

QUESTION 43
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList. You need to ensure that changes to ProductList are automatically reflected in the ListBox control.
What should you do?

A.    Implement the INotifyPropertyChanged interface in the Product class.
B.    Implement the IQueryable<Product> interface in the ProductList class.
C.    Extend the DependencyObject class in the Product class.
D.    Extend the ObservableCollection<Product> class in the ProductList class.

Answer: D

QUESTION 44
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You create a WPF window in the application.
You add the following code segment to the application.

image
The DataContext property of the window is set to an instance of the ViewModel class. The Data property of the ViewModel instance is initialized with a collection of BusinessObject objects.
You add a TextBox control to the Window.
You need to bind the Text property of the TextBox control to the Name property of the current item of the CollectionView of the DataContext object. You also need to ensure that when a binding error occurs, the Text property of the TextBox control is set to N/A.
Which binding expression should you use?

A.    {Binding Path=Data/Name, FallbackValue=’N/A’}
B.    {Binding Path=Data.Name, FallbackValue=’N/A’}
C.    {Binding Path=Data/Name, TargetNullValue=’N/A’}
D.    {Binding Path=Data.Name, TargetNuliValue= ‘N/A’}

Answer: A

QUESTION 45
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.)

image
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 x:Key=”clr:String”>
<TextBlock
Text=”{ Binding StringFormat=Itein Error: {0}}”/>
</DataTemplate>
<DataTeroplate x:Key=”clr:Decirrtal”> <TextBlock
Text=”{Binding StringFormat=Item Price: {0:C}}” />
</DataTemplat.e>
B.    <DataTemplate x:Key “String” Template-“clr :String”> <TextBlock
Text=”{Binding ScringForwac=Item Error: {0}}” />
</DataTemplate>
<DataTemplate x : Key= “clr: Decimal “> <TextBlock
Text=”{Binding StringFormat=Item Price: <0:C}}” /> </DataTemplate>
C.    <DataTemplate x:Key=”Scring” 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>
D.    <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>
E.    <DataTemplate DataType=”clr:String”> <TextBlock
Text=”{Binding StringFormat=Item Error: {0}}” /> </DataTemplate>
<DataTemplate DataType “clr:Decimal”> <TextBlock
Text=”{Binding StringFormat=Item Price: {0:C}}” /> </DataTemplate>

Answer: C

QUESTION 46
You are developing a Windows Presentation Foundation (WPF) application that displays opportunities from List<T> named Leads, where T is a class named Lead. The Lead class contains the properties Title and Revenue.

image
You add a DataGrid control named dgQualifiedLeads to the MainWindow.xaml file. You set the ItemSource property of dgQualifiedLeads to Leads as follows. (Line numbers are included for reference only.)
You need to ensure that CollectionViewSource is used to filter the list to display only Lead objects with revenue of more than $1,000. What should you do?

A. image    
B. image    
C. image    
D.  image   

Answer: A

QUESTION 47
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code segment. (Line numbers are included for reference only.)

image
You add the following code fragment within a WPF window control.

image
The TextBox control is data-bound to an instance of the Contact class. You need to ensure that the Contact class contains a business rule to ensure that the ContactName property is not empty or NULL. You also need to ensure that the TextBox control validates the input data.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two).

A.image     
B.image     
C.  image   
D.   image  
E. image    

Answer: AD

QUESTION 48
You are developing a Windows Presentation Foundation (WPF) application. This application will be used to display customer data to customer service representatives. Phone numbers are stored as ten-digit numbers in the database.
The markup is as follows.
<TextBlock Text=”{Binding Path=PhoneNumber,
ConvertersStaticResource PhoneFormatConverter}}” />
You need to ensure that phone numbers are displayed in the following format: (###) ### – #### Which markup segment should you use?

A.    public object Convert (object value, Type targetType, object parameter, CultureInfo culture)
{
return String.Format[“{0:(###)###-####)”,
(long)parameter);
}
B.    public object Convert (object value. Type targetType, object parameter, CultureInfo culture)
{
return String.Format(“{0: (###)###-####)”, (long)value); }
C.    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return String. Format (“{0: (###)###-####)”, (long)parameter); }
D.    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return String.Format(“{0: (###)###-####)”,
(long)value);
}

Answer: B

QUESTION 49
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You add a TreeView control to show the hierarchical structure of orders and order details. Each order contains an ObservableCollection named OrderDetails. You write the following code fragment. (Line numbers are included for reference only.)

image
You need to ensure that the TreeView control meets the following requirements:
– Each order is shown as a TreeView node.
– The order nodes have order detail nodes as children.
– The order detail nodes have no children.
Which code fragment should you insert at line 07?

A.    <HierarchicalDataTemplate x:Key=”OrderTemplate” DataType=”Order” ItemTernplate=”{StaticResource
OrderDetailTemplate} “> <TextBlock Text=”{Binding Path=.}” />
</HierarchicalDataTemplate>
B.    <HierarchicalDataTemplate x:Key=”OrderTemplate”
ItemsSource=”{Binding Path=OrderDetails>”
ItemTeinplate=”{StaticResource OrderDetailTemplate} “> <TextBlock Text=”{Binding Path=.}” />
</HierarchicalDataTemplate>
C.    <HierarchicalDataTemplate x:Key=”OrderTemplate”
ItemsSource=”{Binding Path=orders}”
ItemTemplate=”{StaticResource OrderDetailTemplate}”> <TextBlock Text=”{Binding Path=.}” />
</HierarchicalDataTemplate>
D.    <HierarchicalDataTemplate x:Key=”OrderTemplate”
ItemsSource=”{Binding Path=orders}” DataType=”Order”> <TextBlock Text=”{Binding Path=.}” />
</HierarchicalDataTemplate>

Answer: B

QUESTION 50
You use Microsoft .NET Framework 4 to create a Windows Forms application. You write the following code segment. (Line numbers are included for reference only.)
01 sealed class FormSettings : ApplicationSettingsBase
02 {
04 public String Description
05 {
06 get {return (String)this[“Description”]; }
07 set {this[“Description”] = value;}
08 }
09 }
You need to ensure that the first time each user opens the application, a text field displays the following message: “Please enter your setting.”
Which code segment should you insert at line 03?

A.    [UserScopedSettingO ]
[DefaultSettingValue(“Please enter your setting.”)]
B.    [UserScopedSetting() ]
[SettingsDescription(“Description: Please enter your setting.”)]
C.    [ApplicationScopedSetting() ]
[DefaultSettingValue(“Please enter your setting.”)]
D.    [ApplicationScopedSetting() ]
[SettingsDescription(“Description: Please enter your setting.”)]

Answer: A

If you want to pass Microsoft 70-511 successfully, donot missing to read latest lead2pass Microsoft 70-511 practice exams.
If you can master all lead2pass questions you will able to pass 100% guaranteed.

http://www.lead2pass.com/70-511.html

         

Why Choose Lead2pass?

If you want to pass the exam successfully in first attempt you have to choose the best IT study material provider, in my opinion, Lead2pass is one of the best way to prepare for the exam.

Lead2pass Testking Pass4sure Actualtests Others
$99.99 $124.99 $125.99 $189 $29.99-$49.99
Up-to-Dated
Real Questions
Error Correction
Printable PDF
Premium VCE
VCE Simulator
One Time Purchase
Instant Download
Unlimited Install
100% Pass Guarantee
100% Money Back