You are on page 1of 7

Microsoft 70-502 (CSharp) C# .NET 3.

5 Windows Presentation Foundation


Question: 1 You work as an Application Developer for certkey. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You have been tasked with adding multimedia content to a WPF application. The content must be usable by different controls both via code and XAML. It must also support layouts. Which of the following is the best solution? A. Use the MediaPlayer control along with the MediaElement control. B. Use the MediaPlayer control. C. No existing media control supports layouts. D. Use the MediaElement control. Answer: D Question: 2 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You have been tasked with creating a WPF application. You will need to use different layout panel controls on various pages, and so you will need to select the appropriate controls for each situation. Which of the following are layout controls in WPF? Each correct answer represents a complete solution. Choose all that apply. A. GroupBox B. Canvas C. Thumb D. Frame E. TabControl F. StackPanel G. WrapPanel H. DockPanel Answer: A, B, C, F, G, H Question: 3 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are making adjustments to a WPF application. You need to produce the layout shown in the image below:

Button Button

Button

Button

Which of the following XAML code segments will produce that layout? A. <StackPanel Width="Auto" Height="Auto" Orientation="Horizontal"> <Button Content="Button" /> <Button Content="Button" VerticalAlignment="Top" /> <Button Content="Button" VerticalAlignment="Center" /> <Button Content="Button" VerticalAlignment="Bottom" /> </StackPanel> <FlowPanel Width="Auto" Height="Auto" Orientation="Horizontal"> <Button Content="Button" /> <Button Content="Button" VerticalAlignment="Top" /> <Button Content="Button" VerticalAlignment="Center" /> <Button Content="Button" VerticalAlignment="Bottom" /> </FlowPanel> <StackPanel Width="Auto" Height="Auto" Orientation="Horizontal"> <Button Content="Button" /> <Button Content="Button" VerticalAlignment="Top" Indent ="5" /> <Button Content="Button" VerticalAlignment="Center" Indent ="15" /> <Button Content="Button" VerticalAlignment="Bottom" Indent ="25" /> </StackPanel> <StackPanel Width="Auto" Height="Auto" Orientation="Horizontal"> <Button Content="Button" /> <Button Content="Button" VerticalAlignment="LeftTop" /> <Button Content="Button" VerticalAlignment="Center" /> <Button Content="Button" VerticalAlignment="RightBottom" /> </StackPanel>

B.

C.

D.

Answer: A Question: 4 You work as an Application Developer for certkey. The company uses Visual Studio .NET Framework3.5 as its application development platform. You are working on a WPF application named ColorApp that contains a Button control named ClickButton and several other WPF controls. ClickButton and other Button controls are contained in a Frame. You want to ensure that whenever a user clicks ClickButton, the background color of the Frame changes to a different color. What is the best way to accomplish this? A. Set ClickButton to OneTime directional binding mode. B. Set ClickButton to OneWayToSource directional binding mode. C. Set ClickButton to OneWay directional binding mode. D. Set ClickButton to TwoWay directional binding mode. Answer: C Question: 5 You work as an Application Developer for certkey. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on a WPF application that contains several navigation pages containing details of the company's products. These pages should be viewed only to the registered employees

of the company. The application contents are hosted in the NavigationWindow object to represent a window that supports content navigation. The employees want to ensure that they are able to navigate through all the application pages, both back and forth. Which of the following actions will you perform to accomplish the task? Each correct answer represents a complete solution. Choose two. A. B. C. D. E. Set the NavigationService.CanGoBack property to true. Call the NavigationService.GoBack method. Set the NavigationService.CanGoBack property to true. Set the NavigationService.CanGoForward property to false. Call the NavigationService.GoBack method. Set the NavigationService.CanGoForward property to true. Call the NavigationService.GoForward method. Set the NavigationService.CanGoForward property to true. Set the NavigationService.CanGoBack property to false. Call the NavigationService.GoForward method. Set the NavigationService.Content property to the current object. Call the NavigationService.Navigate method to the object.

Answer: A, C Question: 6 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on a WPF application that uses twelve Button controls displaying zodiac symbolic images on each of the control to online users. But, you notice that the application becomes very slow at runtime. You need to ensure that the following requirements are met: Each image should cover the button control meant for that image. The application should conserve less memory. The application starts responding faster. The application should conserve the original aspect ratio of each image used for every button control. Which of the following actions will you perform to fulfill all the requirements? A. Use a BitmapImage object as the source of an Image control. B. Set either the DecodePixelWidth or DecodePixelHeight property for each image. C. Set only the DecodePixelWidth property for each image.Certkey 70-502(CSharp) Certkey.com - Make You Succeed To Pass IT Exams D. Set only the DecodePixelHeight property for each image. Answer: B Question: 7 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on an existing WPF application. You are required to alter the appearance of all the Button con trols so that they appear as ellipses. However, you do not want this change to affect any other aspects of the Button controls (such as their behavior or other properties). Which of the following actions will you take to accomplish these requirements?

A. Create a custom button that uses the ellipse as a background. Then use this in place of standard buttons. B. Create a style for the Button control that defines the background as an ellipse, and apply that to all the buttons in your application. C. Create a ControlTemplate for the Button control, and set the background to an ellipse. Then add the template to your application as a resource. D. Create a ControlTemplate for the Button control, and set the background to an ellipse. Then add the template to each page as a resource. Answer: C Question: 8 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on a WPF application and have been assigned to create a custom routed event for the WPF controls in the application. You decide to implement the bubble routing strategy for creating the routed event named MyRoutedEvent1. Choose the steps to create a custom routed event in the correct order. Answer: A Question: 9 You work as an Application Developer for certkey. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on a WPF application named WeatherApp that displays daily weather forecast of any places of the world. The application contains a ComboBox, ProgressBar, some Button controls, and several other WPF controls. If a user types an invalid place name, an error message is displayed immediately. You have applied the OneWayToSource directional binding mode in the application. As soon as a user types or selects a valid place name in the ComboBox and clicks a button, the ProgressBar shows the exact temperature for that selected place at the current date and time. You want to determine the timing for setting the updates for the source binding property. Which of the following members will you consider appropriate for this functionality? A. Binding.BindsDirectlyToSource property B. Binding.UpdateSourceTrigger property C. BindingExpression.UpdateSource method D. BindingExpression.UpdateTarget method Answer: B Question: 10 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on a WPF browser hosted application using Visual Studio 2008 for advertising agent companies. You need to deploy the application under a partial trust security zone. You want to implement the following tasks for the application: Perform edit operation using spell checking options for the formatted text displayed on the application. Create 2-D and 3-D graphics and animations. Load audio and visual files.

Implement bitmap effects. Implement the image encoding options. Which of the above-mentioned tasks are NOT safe to perform under the partial trust environment? Each correct answer represents a complete solution. Choose all that apply. A. Creating 2-D and 3-D graphics and animations. B. Implementing bitmap effects. C. Implementing the image encoding options. D. Loading audio and visual files. E. Performing edit operation using spell checking options for the formatted text displayed on the application. Answer: B, C Question: 11 You work as an Application Developer for certkey. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are responsible for debugging a new accounting application that was designed using WPF. You use data binding throughout the application. You write the following XAML code for each text box in the application: <TextBlock Name="NetIncome" Grid.Row="0" Grid.Column="1" Text="{Binding Path=NetIncome, Mode=OneTime}"/> However, beta testers complain that they do not see values in the text boxes that change either in response to the data source, or in response to calculations based on other text boxes. What is the most likely cause of this problem? A. The Binding Path is listed but should also include the source. B. The Binding Mode should be set only to TwoWay in order to see updates. C. The Binding Mode should be set to anything other than OneTime. D. The TextBlock Name and the Binding Path both use the same name. Answer: C Question: 12 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on a WPF application. One requirement is to be able to display documents. Another requirement is that those documents must also show bold, italic, and underline features. Furthermore, they should support the Span feature. Which of the following is the best way to implement these requirements? A. Implement a FlowDocument class and load documents into it for B. Implement a TextBox control and load documents into it for viewing. C. Implement a DocumentViewer class and load documents into it for viewing. D. Implement a RichTextBox control and load documents into it for viewing. Answer: A

Question: 13 You work as an Application Developer for certkey. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on a WPF application that displays shopping cart to online users. You need to dynamically change the appearance and behavior of all Button controls in the application without having to create a new control for each button. Which of the following features will you use for this requirement? A. Control templates B. Styles C. Data templates D. Triggers Answer: D Question: 14 You work as an Application Developer for certkey. The company uses .NET Framework 3.5 as its application development platform. You need to ensure that the following conditions are met before creating a WPF application: You You You You need to store application data using isolated storage. cannot install your application on the computer. cannot access a file system stored on the computer. can run your application under a limited set of permissions.

Which of the following WPF applications will you create to meet all the abovementioned requirements? A. A XAML Browser application B. A navigation application C. A standalone application D. A Windows application Answer: A Question: 15 You work as an Application Developer for certkey Inc. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You have developed a WPF application that uses XAML serialization and saves files via the SaveFileDialog class. You developed this application as an XBAP application and deployed it with XCOPY deployment technology. However, users find that some methods are generating an error and are not working, even though they are working fine on your development computer. Which of the following is the most likely cause of the issue? A. The XCOPY installation will not properly install, and so you need to use a .msi installation. B. Browser-based applications are not fully trusted and cannot use the SaveFileDialog or XAML serialization. C. The client computer has used Internet Explorer 7.0 for the XBAP application.

D. The XCOPY installation process does not register the application with the client; therefore, the client cannot access system resources. Answer: B

You might also like