Multiple choice technology web technology

How to change the default page of the Silverlight application?

  1. private void Application_Startup(object sender, StartupEventArgs e) { this.RootVisual = new MainPage.xaml; }

  2. private void Application_Startup(object sender, StartupEventArgs e) { this.RootVisual = new MainPage.xaml(); }

  3. private void Application_Startup(object sender, StartupEventArgs e) { this.RootVisual = new this.MainPage; }

  4. private void Application_Startup(object sender, StartupEventArgs e) { this.RootVisual = new MainPage(); }

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To set the default startup page in a Silverlight application, you instantiate the target Page class (e.g., MainPage) and assign the instance to the Application's RootVisual property. The other choices use invalid syntax or refer to the markup filename directly.