Add and Manage Content

These questions are based on 70-502 CSHP – TS – Microsoft .NET Framework 3.5: Windows Presentation Foundation (C# .NET)
Microsoft
Self Test Software Practice Test


Objective: Add and manage content.
Sub-objective: Create and manipulate documents.


Single answer, multiple-choice


You are developing an XAML Browser Application (XBAP) using the Microsoft .NET 3.5 Framework. You have designed a page named MyPage.xaml with some components. You want to make that page the main page of your application. The name of the application file is App.xaml.


What should you do?



  1. Add the following markup in the App.xaml file:
     <Application StartupUri=”MyPage.xaml”/>
  2. Add the following markup in the App.xaml file:
     <Application Source=”MyPage.xaml”/>
  3. Add the following markup in the App.xaml file:
     <Page Source=”MyPage.xaml”/>
  4. Add the following markup in the App.xaml file:
     <Page x:Class=”MyPage”/>

Answer:
A.   Add the following markup in the App.xaml file:
       <Application StartupUri=”MyPage.xaml”/>


Tutorial:
You should add the Application element and set the StartupUri property to the file name. The Application element specifies the settings for the main application page and the StartupUri property specifies the main application file name. The StartupUri property makes the specified file name the main startup application file of your application. The markup should be:


<Application StartupUri=”MyPage.xaml”/>


You cannot set the Source property of the Application element to meet the requirement because the Source property is not a valid property of the Application element.


You should not add the Page element and set the Source property to the file name. The Page element does not specify or make a page the main page of the application. The Page element is used to create a page. You have to set the StartupUri property in the Application element to specify a particular page as the main page.


You should not add the Page element and set the x:Class property to the class name of the file to meet the requirement. The x:Class property specifies the class name of the code-behind file for that page.


Reference:
MSDN2 > MSDN Library > .Net Development > .Net Framework 3.5 > .Net Framework > Windows Presentation Foundation > Application Development > Navigation in Windows Presentation Foundation Applications > Navigation Overview

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment:

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>