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?

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

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

Add the following markup in the App.xaml file: <Page Source=”MyPage.xaml”/>

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.