Examples of exam 70-511 sample

It is more faster and easier to pass the Microsoft 70-511 exam by using Download Microsoft TS: Windows Applications Development with Microsoft .NET Framework 4 questuins and answers. Immediate access to the Improved 70-511 Exam and find the same core area 70-511 questions with professionally verified answers, then PASS your exam with a high score now.

2021 Feb 70-511 course material:

Q41. - (Topic 1) 

You use Microsoft .NET Framework 4 to create a Windows application. You use ClickOnce technology to install the application on computers that run Windows 7 with User Access Control (UAC) enabled. 

The application requires access to environment variables on each computer. 

You need to ensure that users who do not have administrative permissions can install the application. 

Which deployment method should you use? 

A. Start from Web. 

B. Install from Web. 

C. Start from network share. 

D. Install from network share. 

Answer:


Q42. - (Topic 1) 

You are developing a Windows Presentation Foundation (WPF) application to play audio 

files. You add a MediaElement control named mediaElementl and a Button control named btnPlayAudio to the design surface. The MediaElement control Source attribute is set to an audio file. The LoadedBehavior attribute is set to Manual. 

You add the following code to the main window. 

void playCommand_Executed(object sender, RoutedEventArgs e) { 

mediaElementl.Play(); 

You set the command of the button to MediaCommands.Play. 

You need to ensure that the application will play the audio file when the button is pressed. 

What should you add to the constructor of the main window? 

A. RoutedCommand playCommand = new RoutedCommand(); playCommand.CanExecuteChanged += new EventHandler(playCommand_Executed); this.CommandBindings.Add(new CommandBinding(playCommand)); 

B. RoutedUICommand playCommand = new RoutedUICommand(); playCommand.CanExecuteChanged += new EventHandler(playCommand_Executed); this.CommandBindings.Add(new CommandBinding(playCommand)); 

C. CommandBinding playCommand = new CommandBinding(MediaCommands.Play); playCommand.CanExecute += new CanExecuteRoutedEventHandler(playCommand_Executed); this.CommandBindings.Add(playCommand); 

D. CommandBinding playCommand = new CommandBinding(MediaCommands.Play); playCommand.Executed += new ExecutedRoutedEventHandler(playCommand_Executed); this.CommandBindings.Add(playCommand); 

Answer:


Q43. - (Topic 1) 

You are developing a Windows Presentation Foundation (WPF) application. You add several TextBox controls within a StackPanel control. You next add several Image controls within a second StackPanel control. 

During testing, you discover that some of the textboxes do not appear in the proper layout. 

You need to quickly search for the textboxes and view their properties to identify which ones are incorrect. 

What should you do? 

A. Open the QuickWatch window and select the Text Visualizer. 

B. Open the Watch window and select the XML Visualizer. 

C. Open the Autos window and select the HTML Visualizer. 

D. Open the Locals window and select the WPF Tree Visualizer. 

Answer:


Q44. - (Topic 2) 

You have a method named Method1. Method1 accepts a string parameter named param1. Method1 performs a complex operation on param1. 

You load an array of strings to a variable named array 1. The array contains 1,000 items. You need to ensure that other methods that call Method1 can use multiple processor cores when they execute. 

Which code segment should you use? 

A. Array1.AsParalle1().ForAll(Me.Method1) 

B. For Each item. As String In array1 Me.Method1(item) Next 

C. Array1.AsQueryable().AsParallel() 

D. Array1.AsQueryable.All (Me.Method1) 

Answer:


Q45. - (Topic 1) 

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. 

You use the ClickOnce deployment methodology to distribute the application. 

You need to store application-specific data along with read/write permissions without requiring elevated permissions for the application. 

Where should you store the application data? 

A. In isolated storage 

B. On the database server 

C. In the ClickOnce data directory 

D. in the App.config file of the application 

Answer:


Updated exam 70-511 study material:

Q46. - (Topic 2) 

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. 

You write the following code fragment. 

<StackPanel TextBox.PceviewTextInput="StackPanel_PreviewTextInput"> 

<TextBox Name="TxtBoxA"/> 

<TextBox Name="TxtBoxB"/> 

<TextBox Naroe="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 Sub StackPanel_PreviewTextInput(sender As Ctoject, e As TextCompositionEventArgs) Dim feSource As FrameworkElement = TryCast(sender, FrameworkElement) If feSource.Name - "TxtBoxA" OrElse feSource.Name - "TxtBoxB" Then For Each keyword As String In Keywords If e.Text.Contains(keyword) Then 

B. Handled = False Return End If Next 

C. Handled = True End If End Sub 

D. Private Sub StackPanel_PreviewTextInput(sender As Object e As TextCompositionEventArgs) Dim feSource As FrameworkElement = TryCast(e.Source, FrameworkElement) If feSource.Name = "TxtBoxA" OrElse feSource.Name = "TxtBoxB" Then For Each keyword As String In Keywords If e.Text.Contains(keyword) Then e.Handled False Return End If Next 

E. Handled = True End If End Sub 

F. Private Sub StackPanel_PreviewTextInput(sender As Object, e As TextCompositionEventArgs) Dim feSource As FrameworkElement = TryCast(sender, FraroeworkElement) If feSource.Name = "TxtBoxA" OrElse feSource.Name = "TxtBoxB" Then For Each keyword As String In Keywords If e.Text.Contains(keyword) Then e.Handled = True Return End If Next 

G. Handled = False End If End Sub 

H. Private Sub StackPanel_PreviewTextInput(sender As Ctoject, e As TextCompositionEventArgs) Dim feSource As FrameworkElement = TryCast(e.Source, FrameworkElement) If feSource.Name = "TxtBoxA" OrElse feSource.Name = "TxtBoxB" Then For Each keyword As String In Keywords If e.Text.Contains(keyword) Then e.Handled = True Return End If Next 

I. Handled = False End If End Sub 

Answer:


Q47. - (Topic 1) 

You use Microsoft .NET Framework 4 to create a Windows Forms application. 

The application has a reference to a Windows Presentation Foundation (WPF) class library 

named Library1. Library1 contains a WPF user control named UserControl1. 

You add the following code to the application: 

You need to ensure that you can add the instance of UserControl1 to a control named host in Form1. 

Which code segment should you insert at line 09? 

A. WindowsFormsHost host = new WindowsFormsHost (); 

B. ContainerControl host = new ContainerControl(); 

C. Panel host = new Panel(); 

D. ElementHost host = new ElementHost(); 

Answer:


Q48. - (Topic 1) 

You are migrating a Windows Forms application to a Windows Presentation Foundation (WPF) application. 

You need to create a window to display controls. The controls must be positioned by using fixed coordinates. 

Which control should you use in the WPF application? 

A. WrapPanel 

B. StackPanel 

C. Grid 

D. Canvas 

E. UniformGrid 

Answer:


Q49. - (Topic 2) 

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> 

02 

03 <Button> 

04 

05 </Button> 

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.Comrtiand> 

<StaticResource ResourrceKey="saveComr[iand" /> 

</Button.Command> 

B. Insert the following code fragment at line 04. 

<Button.CommandBindings> 

<ConrniandBinding Command="{StaticResource saveCommand}" 

/></Button.CommandBindings> 

C. Insert the following code fragment at line 02. 

<Canvas.CommandBindings> 

<CommandBinding Command="{StaticResource saveConmand)" 

/></Canvas.CommandBindings> 

Replace line 03 with the following code fragment. 

<Button CommandTarget="{Binding RelativeSource={RelativeSource Self), Path=Parent}"> 

D. Insert the following code fragment at line 02. 

<Canvas.Commandsxndings> 

<CommandBinding Command="{StaticResource saveCommand}" 

/></Canvas.CommandBindings> 

Replace line 03 with the following code fragment. 

<Button CommandParameter="{Binding RelativeSource={RelativeSource Self), 

Path=Parent>"> 

Answer:


Q50. - (Topic 2) 

You are developing a Windows Presentation Foundation (WPF) application. 

The movement of a control within the application is animated. 

You need to ensure that the animated control is continually animated in one direction. 

What should you specify for the easing function of the animations? 

A. BackEase 

B. BounceEase 

C. ElasticEase 

D. SineEase 

Answer:



see more http://www.2passeasy.com/exam/70-511/