QUESTION 1
You are designing a Windows Presentation Foundation (WPF) application. The WPF application contains code that will be executed by both full trust callers and partial trust callers. The WPF application code does not have the AllowPartialTmstCallers attribute set. You have the following requirements:
– The application security settings must allow partial trust callers to createand write to a file.
– Users must have access only to files that they create and not to filescreated by other users.
You need to recommend a location for storing each user’ s files. Which location should you recommend?
A. the user’s Roaming folder
B. the user’s LocalSettings folder
C. the user’s IsolatedStorage folder
D. the user’s My Documents folder
Answer: C
QUESTION 2
You are designing an application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. The application will store data that includes a time and date stamp. The middle tier of the application is implemented by using Windows Communication Foundation (WCF). The middle tier connects to geographically separated database servers. You need to ensure that the application meets the following requirements:
– Data stored contains time and date information local to the database server.
– Data stored contains Universal Coordinated Time (UTC).
Which class should you use?
A. DateTime
B. DateTime Offset
C. TimeZonelnfo
D. TimeZone
Answer: B
QUESTION 3
You are designing a Windows Presentation Foundation (WPF) application. The application calls methods that perform long-running computational tasks. You need to recommend an approach for ensuring that the application remains responsive while the tasks are executing. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Use synchronous method calls from a thread other than the thread on which the user interface runs.
B. Run the user interface from a new multi-threaded apartment (MTA) thread.
C. Use synchronous method calls from the user interface thread.
D. Use asynchronous method calls from the user interface thread.
Answer: AD
QUESTION 4
You are designing a Windows Presentation Foundation (WPF) client application that requests reports from a Windows Communication Foundation (WCF) Web service. Users must be able to perform other tasks while the WCF Web service generates the report. You need to recommend a message exchange pattern for the communication between the WPF application and the WCF Web service. What are two possible message exchange patterns that will meet the requirements? (Each correct answer presents a complete solution. Choose two.)
A. Datagram with session
B. Request-Response
C. Duplex
D. Datagram without session
Answer: CD
QUESTION 5
You are designing an n-tier solution that includes a Windows Presentation Foundation (WPF) client application. The WPF application connects to a middle-tier server that runs the data access layer. The data access layer connects to a Microsoft SQL Server 2008 database and to a mainframe-based database. The mainframe-based database will be replaced in one year. You have the following requirements:
– Centrally manage all database connections.
– Minimize changes to the code base when the database is replaced.
– Ensure that the WPF application will not need to be redeployed when thedatabase is replaced.
You need to recommend an approach for designing the data access layer. What should you recommend?
A. Create a data access layer class that uses a database factory class to access all databases.
Add the connection string information for the databases to the configuration file for the WPF application
B. Add the connection string information for the databases to the configuration file for the WPF application.
Implement one class in the WPF application for each data source.
C. Create a data access layer class that uses a database factory class to access all databases.
Add the connection string information for the databases to the configuration file for the data access layer class.
D. Add the connection string information for the databases to the configuration file for the WPF application.
Implement a database factory class from within the WPF application.
Answer: A
QUESTION 6
You are designing a Windows application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
You need to use a replacement culture for the application at runtime.
You also need to ensure that the information in the custom culture will be available to the application.
Which two tasks should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Restart the process that is displaying the user interface,
B. Register the replacement culture by using the CultureAndRegionlnfoBuilder class.
C. Register the replacement culture by using the Culturelnfo class.
D. Call the Save method of the CultureAndRegionlnfoBuilder class instance.
Answer: AB
QUESTION 7
You are designing a Windows Presentation Foundation (WPF) application that will be used to display real-time data from a Microsoft SQL Server 2008 database.
You need to recommend an approach for displaying the data.
Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)
A. Implement Oneway binding between the controls in the WPF application and objects in the data layer.
B. Implement OneWayToSource binding between the controls in the WPF application and objects in the data layer.
C. Use a SqlCacheDependency object in the data layer to query the database when a change is detected.
D. Use a System.Runtime.Caching object in the data layer with a sliding expiration, and query the database when the Cache object expires.
Answer: AC
QUESTION 8
You are designing a Windows application.
The application must meet the following requirements:
– Provide three-dimensional views of data.
– Display images, text, graphs, and videos.
– Support porting to a browser-based application.
You need to recommend a technology that meets the requirements.
Which technology should you recommend?
A. Windows Presentation Foundation (WPF)
B. Direct3D
C. GDI+
D. Windows Forms
Answer: A
QUESTION 9
You are working with an existing Windows Presentation Foundation (WPF) application in Microsoft Visual Studio 2010. The WPF application requires approximately one minute to initialize before displaying its main window.
You have the following requirements:
– Immediately display a splash screen when the WPF application launches.
– Allow for the display of an initialization progress bar on the splashscreen.
– Close the splash screen when the WPF application is ready to display themain window.
You need to recommend an approach for meeting the requirements.
What should you recommend?
A. Launch a custom splash screen by using a Window object.
When the initialization completes, launch the main window from the splash screen.
B. Create a SplashScreen object. Display the object in the code-behind of the App.xaml file.
C. Move the initialization code to the code-behind of the main window.
D. Compile an image into the WPF application with a Build Action value of SplashScreen.
Answer: A
QUESTION 10
You are designing a Windows Presentation Foundation (WPF) application. Business entity objects are bound to controls on each data entry window.
The WPF application must meet the following requirements:
– Display a watermark in each empty text box.
– Display watermarks in a lighter color than user entries.
The watermark code must be reusable with other user interface controls.
You need to recommend an approach for creating the watermarks.
What should you recommend?
A. Modify each business entity object to return the watermark text if the property has no data.
B. Attach a custom attached property and an Adorner to each text box.
C. Create a value converter to format the bound value of the business entity objects.
D. Create handlers for the OnFocus and OnFocusLost events of the text boxes in the code-behind.
Answer: B
Free Download Microsoft 70-518 PDF and VCE Dumps Help You 100% Pass Exam