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

Read More

2014 Latest 100% Pass Guaranteed Microsoft 70-511 Practice Tests (31-40)

QUESTION 31
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application includes a function that is triggered by filling out a form and by clicking a button.
Currently, the application is tested manually.
You need to create an automated and iterative process to test the application.
What should you do?

A.    use IntelliTrace.
B.    Use UISpy.exe to extract the user interface (UI) Information. Then, use MSTest.exe.
C.    Use classes in the System.Windows.Automation and System.Windows.Automation.Text namespaces.
D.    Use the Action Recording methodology to record the user interface (UI) actions. Then, use MSTest.exe.

Answer: C

QUESTION 32
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment to bind a customer object to several controls in a window.
<TextBox Text=”{Binding Path=CustomerName}” Name=”textBoxl” />
When the application executes, you receive the following error message:
“System.Windows.Data Error: 35: BindingExpression path error:
‘CustomerName’ property not found on ‘object’ “Customer1 (HashCode=22613453).
BindingExpression:Path=CustomerNarne; DataItem=’Customer’ (HashCode=22613453);
target element is ‘TextBox’ (Name=’textBoxl’);
target property is ‘Text’ (type ‘String’)”
You need to identify the source of the error.
What should you do?

A.    Use a Trace object.
B.    Use a Debug object.
C.    Use the WPF Visualizer.
D.    Use a PresentationTraceSources object.

Answer: D

QUESTION 33
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.

image
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=”Bottom” DockPanel.Dock”Bottom’7>
<Button Content=”Left”/> <Button Content=”Center”/> </DockPanel>
C.    <DockPanel>
<Button Content-“Left”/>
<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-“Left”/> <Button Content=”Center”/>
<Button Content=”Bottom” DockPanel.Dock=”Bottom”/> </DockPanel>

Answer: B

QUESTION 34
You are developing a Windows Presentation Foundation (WPF) application for a travel reservation system.
You need to ensure that users can select a range of travel dates.
What should you do?

A.    Add a single DatePicker control to the design surface.
B.    Add a single Calendar control to the design surface.
C.    Add a single MediaElement control to the design surface to display a calendar.
D.    Add the appropriate Windows Forms references to the project references. Add a single windows Forms
DoteTimePicker control to the design surface.

Answer: B

QUESTION 35
You use Microsoft. NET Framework 4 to create a custom Windows Presentation Foundation (WPF) application.
Your environment includes several WPF applications. The applications use the same logo and style configuration as part of a corporate standard.
You need to ensure that the existing applications can be updated to use the same logo and style settings without recompiling.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Mark the resource as an embedded resource in each application.
B.    Create a resource in an XAML file that contains the logo and style configurations.
C.    Create a resource in a custom control that contains the logo and style configurations.
D.    Add the resource as a Resource Dictionary in the Merged Dictionaries collection of each application.
E.    Use Resource Manager to read the content of the resource. Manually assign the style configurations
included in the resource file to the appropriate control in each application.

Answer: BD

QUESTION 36
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.    FlowDocumentPageviewer
D.    FlowDocumentScrollViewer

Answer: B

QUESTION 37
You are developing a Windows Presentation Foundation (WPF) application. The application contains stylized body text and heading text. The heading text is a slight variation of the body text.
You need to ensure that if the body text changes, the heading text automatically inherits those changes.
What should you do?

A.    Set the Value property of the style setter to point to a static resource.
B.    Set the BasedOn property of the heading style to point to a static resource for the body text style.
C.    Set the Key property of the heading style to start with the name of the body text style.
D.    Set the TargetType property of the heading style to TextBlock.

Answer: A

QUESTION 38
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains the following code fragment.
<StackPanel>
<TextBlock Style=”{StaticResource HyStyle)”>Hello World</TextBlock> <Button Style=”{StaticResource HyStyle}”>Ok</Button> </StackPonel>
You need to define a style that applies the following properties to the text in the StackPanel object:
FontSize = 32
FontWeight = Bold
Which code fragment should you use?

A.    <Style x:Key=”MyStyle” TargetType=”{x:Type Control}”>
<Setter Property=”TextElement.FontSize” Value=”32″ />
<Setter Property-“TextElement.FontUeight” Value=”Bold” /> </Style>
B.    <Style x:Key=”MyStyle” TargetType=”{ x : Type Framework-Element} “>
<Setter Property=”TextElement.FontSize” Value=”32″ /
<Setter Property=”TextElement.FontWeight” Value=”Bold” /> </Style>
C.    <Style x:Key=”MyStyle” TargetType=”{x:Type TextElement}”>
<Setter Property=”Control.FontSize” Value=”32″ />
<Setter Property=”Control.FontUeight” Value=”Bold” /> </Style>
D.    <Style x:Key=”MyStyle” TargetType-“(x:Type UserControl)”>
<Setter Property=”Control.FontSize” Value=”32″ />
<Setter Property=”Control.FontWeight” Value=”Bold” /> </Style>

Answer: B

QUESTION 39
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a form named frmMain that contains a button named btnSave. You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirements:
– saveProgress is slightly visible after 0.2 seconds
– saveProgress is fully visible after 1 second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.) 01 <Storyboard xiKey” animateProgress” TaEgetName=”saveProgress”> 03 </Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?

A.    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=”Visibility”>
<DiscreteObjectKeyFrame KeyTime=”00:00:00″ Value=”{x:Static Visibility.Collapsed)” />
<DiscreteObjectKeyFrame KeyTime=”00:00:01″ Value=”{x:Static Visibility.Visible)” />
</ObjectAnimationUsingKeyFrames>
B.    <ObjectAnimationUsingKeyFrames Storyboard. TargetProperty=”Visibility”>
<DiscreteObjectKeyFrame KeyTime””0″
Value=”{x:Static Visibility.Collapsed)” />
<DiscreteObjectKeyFrame KeyTime=”l” Value=”{x:Static Visibility-Visible)” />
</ObjectAnimationUsingKeyFrames>
C.    <DoubleAnimation Storyboard.TargetProperty=”Opacity” Duration=”00:00:01″ From=”0″ To=”1″ />
D.    <DoubleAnimation Storyboard.TargetProperty=”Opacity” Duration=”l” From=”0″ To=”l” />

Answer: C

QUESTION 40
You are developing a Windows Presentation Foundation (WPF) application. All of the application styles are in a file named Themes.dll. You have the following markup segment.
<Border Style=”{StaticResource BlueBackground}”
Height=”100″ Width=”200″>
</Border>
BlueBackground is defined in a XAML file named BlueTheme.xaml. The XAML markup is compiled into the Themes.dll file.
You need to ensure that the XAML file is referenced so that the application can apply the settings in the BlueBackground style.
What should you do?

A.    Add the following line to Window.Resources.
<ResourceDictionary
Source=”/Themes;component/BlueTheme.xaml” />
B.    Add the following line to Window.Resources. <ResourceDictionary Source=”pack://application:,,,/Themes;
BlueTheme.xaml” />
C.    Add the following line to Border.Resources.
<ResourceDiccionary
Source=”/Themes;component/BlueTheme.xaml” />
D.    Add the following line to Border.Resources.
<ResourceDictionary
Source=”pack://application:,,,/Themes;BlueTheme.xaml” />

Answer: A

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

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

2014 Latest 100% Pass Guaranteed Microsoft 70-511 Practice Tests (21-30)

QUESTION 21
You are developing a Windows Presentation Foundation (WPF) application that contains a custom Button control.
The custom Button control can be set as active by setting an IsActive property to true. You need to ensure that the IsActive property can be bound to a business object.
What should you do on the custom Button control?

A.    Implement IsActive as a Microsoft .NET property.
B.    Implement IsActive as a Dependency property.
C.    Implement INotifyPropertyChanged
D.    Implement IQueryable.

Answer: B

Read More

2014 Latest 100% Pass Guaranteed Microsoft 70-511 Practice Tests

QUESTION 11
You are developing a Windows Presentation Foundation (WPF) application. You have the following style defined in the app.xaml file.
<Style x:Key=”btnItalic” x:Naitie= “styleItalic”
TargetType=”{x:Type Button}”>
<Setter Property=”FontStyle” Value=”Italic”/> </Style>
You need to apply this style to a button named button1 in the application at run time.
Which code segment should you use?

A.    button1.Style =
this.FindName(“styleltalic”) as Style;
B.    button1.Style =
this.FindName(“btnltalic”) as Style;
C.    button1.Style =
this.FindResoucce(“btnltalic”) as Style;
D.    button1.Style =
this.FindResource(“styleltalic”) as Style;

Answer: C

QUESTION 12
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You add a custom command as a resource. The key of the command is saveCommand. You write the following code fragment. (Line numbers are included for reference only.)
01 < Canvas>
03 <Button>
05 </Bucton>
06 </Canvas>
You need to ensure that saveCommand is executed when the user clicks the Button control.
What should you do?

A.    Insert the following code fragment at line 04.
<Button.Coiranand>
<StaticResource ResourceKey=”saveCoKiniand” /> </Button.Command>
B.    Insert the following code fragment at line 04.
<Button.CommandBindings>
<CoRimandBinding Comitiand=”( StaticResource saveCoimtiand}” /> </Button.CommandBindings>
C.    Insert the following code fragment at line 02.
<Canvas.CommandBindings>
<ComtnandBinding Command=”{StaticResoucce saveComroand}” /> </Canvas.CommandB indings>
Replace line 03 with the following code fragment.
<Bucton CommandTarget=”{Binding RelativeSource={RelativeSource Self}, Path=Parent>”>
D.    Insert the following code fragment at line 02.
<Canvas.CommandBindings>
<CommandBinding Command=”{StaticResoucce saveComroand}” /> </Canvas.CommandBindings>
Replace line 03 with the following code fragment.
<Buccon CommandPararoecec=”{Binding RelativeSource=(RelaciveSource Self}, Path=Parent>”>

Answer: A

QUESTION 13
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application displays a list of books. You write the following code fragment. (Line numbers are included for reference only.)
01 <Window. Resources>
02 <XmlDataProvider x:Key=”InventoryData” XPath=”Books”>
03 <x:XData>
04 <Books xmlns=””>
05 <Book Title=”XML in Action” Stock=”in” />
06 <Book Title=”Inside C#” Stock-“out” />
07 <Book Title=”Introducing Microsoft .NET” Stock=”in”/>
08 </Books>
09 </x:XData>
10 </XrolDataPi:ovider>
11 <Style x:Key=”HyIternStyle” TargetType=”{x:Type ListBoxItem) “>
12
13 </Style>
14 </Window.Resources>
15 <ListBox ItetnContainerStyle=”{StaticResource HyItemstyle) “>
16 <ListBox.ItemsSource>
17 <Binding Source=”{StaticResource InventoryData}” XPath=”Book”/>
18 </ListBox. ItemsSource>
19 <ListBox. ItewTeitiplate>
20 <DataTemplate>
21 <TextBlock>
22 <TextBlock.Text>
23 <Binding XPath=”@Title”/>
24 </TextBlock.Text>
25 </TextBlock>
26 </DotaTemplote>
27 </LiscBox. IcemTemplate
28 </ListBox>

A.    <Style.Triggers>
<Trigger Binding. XmlNarnespaceHanager””! Binding XPath”6Stock>”
Value-“out”> <Setter Property-Toreground” Value-“Red” />
</Trigger>
</Style.Triggecs>
B.    <Style.Triggers>
<DataTrigger Binding-“<Binding XPath”0Stock)” Value””out”>
<Setter Pcoperty=”Foregcound” Value=”Ped” />
</DataTrigger>
</Style.Triggers>
C.    <Style.Triggers>
<Trigger Binding.XmlNamespaceHanager=”{Binding XPath=BookGStock)” Value=”out”>
<Setter Property=”Foreground” Value=”Red” />
</Trigger>
</Style.Tr iggers>
D.    <Style.Triggers>
<DataTrigger Binding=”{Binding XPath=Book8Stock}” Value=”out”>
<Setter Property=”Foreground” Value=”Red” />
</DataTrigger>
</Style.Triggers>

Answer: B

QUESTION 14
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment.
< StackPanel TextBox.PreviewTextInput=”StackPanel_PreviewTextInput” >
< TextBox Name=”TxtBoxA”/>
< TextBox Naroe=”TxtBoxB”/>
< TextBox Name=”TxtBoxC”/>
< /StackPanel>
You create an event handler named StackPanel_PreviewTextInput. You also have a collection of strings named Keywords.
You need to ensure that TxtBoxA and TxtBoxB do not contain any of the strings in the Keywords collections.
Which code segment should you use?

A.    private void StackPanel_PreviewTextInput(
object sender, TextCompositionEventArgs e) (
FrameuorkEleroent feSource sender as Framework Element:
if (resource.Name == “TxtBoxA” || feSource.Name == “TxtBoxB”) {
foreach(string keyword in Keywords)
if(e.Text.Contains(keyword) )
{
Handled = false; return;
}
}
Handled = true;
}
}
B.    private void StackPanel_PreviewTextInput(
object sender, TextCompositionEventArgs e)
(
FrameworkElement feSource = e.Source as FrameworkElement; if (feSource.Name == “TxtBoxA” ||
feSource.Name == “TxtBoxB”) {
foreach(string keyword in Keywords)
{
if(e.Text.Contains(keyword))
{
Handled false;
return;
}
}
Handled = true;
}
}
C.    private void StackPanel PreviewTextlnput(
object sender, TextCompositionEventArgs e)
{
FrameworkElement feSource = sender as FrameworkElement; if (feSource.Name == “TxtBoxA” ||
feSource.Name == “TxtBoxB”) {
foreach(string keyword in Keywords)
{
if(e.Text.Contains(keyword) )
{
Handled = true; return;
}
}
Handled = false;
}
}
D.    private void StackPanel_PreviewTextInput(
object sender, TextCompositionEventArgs e)
{
FrameworkElement feSource = e. Source as FrameworkElement; if (feSource.Name == “TxtBoxA” ||
feSource.Name == “TxtBoxB”) {
foreach(string keyword in Keywords) {
if(e.Text.Contains(keyword) )
{
Handled = true; return; )
}
Handled = false;
}
}

Answer: D

QUESTION 15
You are developing a user control for a Windows Presentation Foundation (WPF) application. The user control contains a button. Both the user control and the hosting control must receive the button click event.
You need to ensure that the user control responds to the button click event before the hosting control responds to the event.
What should you do?

A.    Use a bubbling routed event. In the button click event handler, set the Handled property to true,
B.    Use a bubbling routed event. In the button click event handler, set the Handled property to false.
C.    Use a standard Microsoft .NET event. Set the Handled property to true.
D.    Use a tunneling routed event. Set the Handled property to false.

Answer: C

QUESTION 16
You use Microsoft .NET Framework 4 to create a Windows Presentation Framework (WPF) application.
You plan to create a custom control that contains four text input fields. Each of the text input fields within the control will contain a label.
You need to ensure that the text input fields within the control can be validated by using a regular expression validator.
Which class should you inherit from?

A.    TextBox
B.    TextElement
C.    UIElement
D.    UserControl

Answer: D

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

image
You need to ensure that both Button controls display the “Save” text.
Which code fragment should you insert at line 06?

A.    <TextBlock Text=”{Binding}” />
B.    <TextBlock Text=”{TemplateBinding Content}” />
C.    <ContentPresentec Content=”{Binding}” />
D.    <ContentPresentec />

Answer: D

QUESTION 18
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You plan to store the name of the file to a variable named SoundFilePath. You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays.
What should you do?

A.    Write the following code segment in the button onclick event.
System.Media.SoundPlayer player = new System.Media.SoundPlayer(SoundFilePath); player.Play() ;
B.    Write the following code segment in the button onclick event.
MediaPlayer player = new MediaPlayer() ;
player.Open(new URI(SoundFilePath), UriKind.Relative)); player.Play() ;
C.    Use the following code segment from the PlaySound() Win32 API function and call the PlaySound function
in the button onclick event.
[sysimport (dll=”winmm.dll”) ]
public static extern long PlaySound(String SoundFilePath, long hModule, long dwFlags);
D.    Reference the Microsoft.DirectX Dynamic Link Libraries. Use the following code segment in the button onclick
event.
Audio song = new Song(SoundFilePath);
song.CurrentPosition = song.Duration;
song.Play ();

Answer: B

QUESTION 19
You use Microsoft .NET Framework 4 to create a Windows Forms application. You plan to use a Windows Presentation Foundation (WPF) control of the UserControl1 type hosted in an ElementHost control named elementHost1.
You write the following code segment. (Line numbers are included for reference only.)

image
You need to ensure that the application changes the background color of the hosted control when the background color of the form changes.
Which code segment should you insert at line O5?

A.    elementHost1.PropertyMap.Remove (“BackColor”);
elementHost1.PropertyMap.Add(“BackColor”, new PropertyTranslator(OnBackColorChange));
B.    elementHost1. PropertyMap . Remove (“Background”);
elementHost1.PropercyMap.Add(“Background”, new PropertyTranslator(OnBackColorChange));
C.    elementHost1.PropertyMap.Add(“BackColor”, new PropertyTranslator(OnBackColorChange));
elementHost1.PropertyMap.Apply(“BackColor”);
D.    elementHost1.PropertyMap.Add(“Background”, new PropertyTranslator(OnBackColorChange));
elementHostl.PropertyMap.Apply(“Background”);

Answer: A

QUESTION 20
You develop a Windows Presentation Foundation (WPF) application. This application is used to output data trends to customer service representatives. A data trend analysis is performed in a function named UpdateTrendData. The trend analysis is a long-running process.
The application contains the following code segment.
Class MainWindow: Window {
private void UpdateData(object arg)
{
double data = UpdateTrendData();

}
}
UpdateData is currently invoked on the UI thread when the form is first displayed. You need to process the data in a manner that does not cause the UI to freeze.
What should you do?

A.    Use ThreadPool.SetMaxThreads(2, 2) and invoke UpdateData.
B.    Use ThreadPool.QueueUserWorkItem to invoke UpdateData.
C.    Use this.Dispatcher.Beginlnvoke to invoke UpdateData passing in the priority of Normal.
D.    Use this.Dispatcher.BeginInvoke to invoke UpdateData passing in the priority of Background.

Answer: B

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

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

2014 Latest 100% Pass Guaranteed Microsoft 70-511 Practice Tests (1-10)

QUESTION 1
You use Microsoft .NET Framework 4 to create a Windows Forms application. You add a new class named Customer to the application. You select the Customer class to create a new object data source. You add the following components to a Windows Form:
– A BindingSource component named customerBindingSource that is data-bound to the Customer object data source.
– A set of TextBox controls to display and edit the Customer object properties. Each TextBox control is data-bound to a property of the customerBindingSource component.
– An ErrorProvider component named errorProvider that validates the input values for each TextBox control.
You need to ensure that the input data for each TextBox control is automatically validated by using the ErrorProvider component. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Implement the validation rules inside the Validating event handler of each TextBox control by throwing
an exception when the value is invalid.
B.    Implement the validation rules inside the TextChanged event handler of each TextBox control by throwing
an exception when the value is invalid.
C.    Implement the validation rules inside the setter of each property of the Customer class by throwing an
exception when the value is invalid.
D.    Add the following code segment to the InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.customerBindingSource;
E.    Add the following code segment to the InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.customerBindingSource.DataSource; this.errorProvider.DataMember
= this.customerBindingSource.DataMember;

Answer: CD

QUESTION 2
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a ListBox control named IbxItems that is data-bound to a collection of objects. Each object has a DisplayValue property. You add a Button control to the application. You need to ensure that the Content property of the Button control is data-bound to the DisplayValue property of the selected item of IbxItems. Which binding expression should you use?

A.    {Binding ElementName= IbxItems, Source=SelectedItem, Path=DisplayValue}
B.    {Binding Source=lbxItems, ElementName=SelectedItem, Path=DisplayValue}
C.    {Binding ElementName=lbxItems, Path=SelectedItem.DisplayValue}
D.    {Binding Source=lbxItems, Path=SelectedItem.DisplayValue}

Answer: C

QUESTION 3
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment.
< TextBox Text=”{Binding Path=StringMember} ” / >
You need to ensure that the StringMember property of the data-bound object is updated immediately when the user types in the TextBox control.
Which binding expression should you use?

A.    { Binding Path=StringMember, Mode=TwoWay }
B.    { Binding Path=StringMember, NotifyOnSourceUpdated=True }
C.    { Binding Path-StringMember, NotifyOnTargetUpdated=True }
D.    { Binding Path=StringMember, UpdateSourceTrigger=PropertyChanged }

Answer: D

QUESTION 4
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. The number of items of the data-bound collection is fixed. However, users can modify the properties of each of the Product objects in the collection. You need to ensure that changes made on the Product objects are automatically reflected in the ListBox control. What should you do?

A.    Implement the INotifyPropertyChanged interface in the Product class.
B.    Implement the INotifyCollectionChanged interface in the ProductList class.
C.    Set the Mode property of the Binding object of the ListBox control to TwoWay.
D.    Set the UpdateSourceTrigger property of the Binding object of the ListBox control to PropertyChanged.

Answer: A

QUESTION 5
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You plan to allow users to customize the background colors, foreground colors, and font style of the application. You also plan to add a TextBlock control to the application. You write the following code fragment. (Line numbers are included for reference only.)

image
You need to ensure that the ContextMenu control is associated with the TextBlock control. You also need to ensure that the properties that can be customized are shown hierarchically. Which code fragment should you insert at line 15?

A.    < Grid >
< Menu >
< MenuItem Header=”Color Scheme” DataContext=”{StaticResource colorschemes}”
ItemsSource=”{Binding Path=.}” ItemTemplate=”{StaticResource StringTemplate}” / >
< MenuItem Header=”Font” DataContext=”{StaticResource fonts}” ItemsSource=”{Binding Path=.}”
ItemTemplate=”{StaticResource StringTemplate}” />
< /Menu>
< TextBlock ttidth-“200” Height-“100” Background-“LightBlue” / > </Grid >
B.    < Window.ContextMenu >
< ContextMenu >
< MenuItem Header=”Color Scheme” DataContext=”{StaticResource colorschemes)”
ItemsSource=”{ Binding Path ItemTemplate=”{StaticRes ource StringTemplate}” /> < MenuItern
Header=”Font” DataContext=”{ StaticResource fonts!” ItemsSource=,,{ Binding Path=.}”
ItemTemplate=”{StaticResource StringTemplate}” />
< /ContextMenu >
< /Window.ContextMenu >
C.    < Grid >
< TextBlock TJidth=”200″ Height= “100” Background=”LightBlue” / > </Grid > < Window. ContextMenu >
< ContextMenu >
< TextBlock Width=”200″ Height=”100″ Background=”LightBlue” / > < MenuItem Header=”Color Scheme”
DataContext=”{StaticResource colorschemes}” ItemsSource=”{Binding Path*.}” ItemTemplate=”{StaticResource
ColorSchemeTemplate}” /> < MenuItem Header=”Font” DataContext=”{StaticResource fonts}” ItemsSource=”
{Binding Path=.}” ItemTemplate=”{StaticResource StringTemplate}” >< /MenuItem > < /ContextMenu >
</Window.ContextMenu >
D.    < Grid >
< TextBlock Uidth=”200″ Height=”100″ Background=”LightBlue” > < TextBlock.ContextMenu >
< ContextMenu >
< MenuItem Header=”Color Scheme” DataContext=”{StaticResource colorschemes)” ItemsSource=”{Binding
Path=.) ItemTemplate=”{StaticResource ColorSchemeTemplate}” / > < MenuItem Header=”Font”
DataContext=”{StaticResource fonts)” ItemsSource=”{Binding Path=.}” ItemTemplate=”{StaticResource
StringTemplate}” > < /MenuItem > </ContextMenu >
< /TextBlock.ContextMenu >
< /TextBlock > </Grid >

Answer: D

QUESTION 6
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment.

image
You need to implement the MyProject.MyConverter class. What should you do?

A.    Implement the IValueConverter interface.
B.    Implement the IMultiValueConverter interface.
C.    Inherit from the TypeConverter class.
D.    Apply the TypeConverterAttribute attribute.

Answer: A

QUESTION 7
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains an ObservableCollection object named Pictures that contains several Picture objects. Each Picture object contains the Name and PictureFilePath properties. You add a ListBox control to the application. You need to ensure that the pictures are displayed in the ListBox control. Which code fragment should you use?

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

Answer: B

QUESTION 8
You use Microsoft .NET Framework 4 to create a Windows Forms application. You have a dataset as shown in the following exhibit.

image
You plan to add a DataGridView to display the dataset. You need to ensure that the DataGridView meets the following requirements:
– Shows Order Details for the selected order.
– Shows only Order Details for items that have UnitPrice greater than 20
– Sorts Products by ProductName
Which code segment should you use?

A.    ordersBindingSource.DataSource = producxsBindingSource; ordersBindingSource.DataMember =
“FK_Order_Details_Products”; productsBindingSource.Filter = “UnitPrice > 20”;
productsBindingSource.Sort = ProductName”;
B.    productsDataGridView.DataSource = ordersBindingSource; productsBindingSource.Filter = “UnitPrice > 20”;
productsBindingSource.Sort = “ProductName”;
C.    order DetailsBindingSource.DataSource = ordersBindingSource; order_DetailsBindingSource.DataMember =
“FK_Order_Details_Orders”.
order_DetailsBindingSource .Filter = “UnitPrice > 20”; productsBindingSource.Sort “ProductName”;
C D. order_DetailsDataGridViev.DataSource = ordersBindingSource; order_DetailsBindingSource.Filter =
“UnitPrice > 20”; productsBindingSource.Sort “ProductName”;

Answer: C

QUESTION 9
You are developing a Windows Forms application that contains a DataGridView control. The DataGridView is composed of several fields that capture the customer’s name, address, and phone number. You have been asked to provide data validation in a DataGridView to prevent users from leaving the name field if the name field is empty. You need to ensure that users cannot tab out of the name field without entering data. What should you do?

A.    Validate the name field in the CellValidating event. Set e.Cancel – true if the name field is empty.
B.    Validate the name field in the CellErrorTextChanged event. Get e.RowIndex if the name field is empty.
C.    Validate the name field in the CellEnter event. Set the focus on the name field if the name field is empty.
D.    Validate the name field in the CancelRowEdit event. Set the focus on the name field if the name field is empty.

Answer: A

QUESTION 10
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. (Line numbers are included for reference only.)
01 <Canvas>
02 <Rectangle Stroke=”Red” Stroke Thickness=”5″ Height=”60″
03 Width-“60” Canvas. Leftoff Canvas.Top-“100”>
04
05 </Rectangle>
06 </Canvas>
You need to rotate the rectangle by 45 degrees by using its upper-left corner as the axis.
Which code fragment should you insert at line 04?

A.    <Rectangle.RenderTransforro>
<RotateTransform Angle=”45″ CenterX=”0″ CenterY=rf0″ /> </Rectangle.RenderTransform>
B.    <Rectangle.RenderTransform>
<RotateTransform Angle=”45″ CenterX=”100″ CenterY=”100″ /> </Reccangle.RenderTransform>
C.    <Rectangle.LayoutTransform>
<RotateTransform Angle=”45″ CenterX=”0″ CenterY-“0″/> </Rectangle.LayoutTransform>
D.    <Rectangle.LayoutTransform>
<RotateTransforro Angle=”45″ CenterX=”100″ CenterY=”100″/> </Rectangle.LayoutTransform>

Answer: A

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

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