PrepAway - Latest Free Exam Questions & Answers

Category: 70-506

Exam 70-506: TS: Silverlight 4, Development

Which XAML fragment should you insert at lines 03 and 04?

You are developing a Silverlight 4 application.
You have a page that contains the following XAML fragment.
<StackPanel Orientation=”Vertical”>
<Grid x:Name=”Master”>
<ListBox x:Name=”lstOrders” />
</Grid>
<Grid x:Name=”Details”>
<ListBox x:Name=”lstOrdersDetails” />
<myControls:DetailsViewLoading />
</Grid>
</StackPanel>
The application defines the DetailsViewLoading user control by using the following XAML fragm ent. (Line numbers are included for reference only.)

01 <UserControl x:Class=”DetailsViewLoading” xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”>
02 <Grid>
03
04
05 <StackPanel>
06 <TextBlock Text=”Loading Details…”/>
07 <Button Content=”Close” Click=”CloseBtn_Click”/>
08 </StackPanel>
09 </Border>
10 </Grid>
11 </UserControl>

You need to display the DetailsViewLoading user control on top of the other content in the Details Grid control. You also need to ensure that the rest of the content in the Details Grid control is unavailable until the DetailsViewLoading user control is closed. Which XAML fragment should you insert at lines 03 and 04?

Which XAML fragment should you use?

You are developing a Silverlight 4 application. The application contains a control that allows users to select user profile options. You need to define a set of controls that allows users to select between the following background colors:
White
Gray

You also need to define a set of controls that allows users to select between the following default window sizes:
900 x 700
700 x 500
Which XAML fragment should you use?

Which code segment should you write in the load event of the window?

You are developing a Silverlight 4 application. The application contains a window that has a TextBlock named TxtHeading. The application also has a font named MyFont in a file named MyFont.otf. MyFont.otf is located in the root folder of the Web application that hosts the Silverlight application. You need to dynamically load the font file and use it to display the contents of TxtHeading. Which code segment should you write in the load event of the window?

Which code segment should you insert at line 06?

You are developing a Silverlight 4 application. You plan to host the application in a Web application. The Web application contains a zip file named Images.zip that contains an image named logo.jpg. You write the following code segment.

WebClient client = new WebClient();
client.OpenReadCompleted += new OpenReadCompletedEventHandler(ClientOpenReadCompleted);
client.OpenReadAsync(new Uri(@”..\Images.zip”,UriKind.Relative));

You also write the following event handler. (Line numbers are included for reference only.)

01 void client_OpenReadCompleted(object sender,
02 OpenReadCompletedEventArgs e)
03 {
04 if (e.Error == null && !e.Cancelled)
05 {
06
07 }
08 }

The main window contains an Image element named ImgLogo. You need to extract logo.jpg from Images.zip and set logo.jpg as the source for ImgLogo. Which code segment should you insert at line 06?

Which code segment should you insert at line 03?

You are developing a Silverlight 4 application. The application is hosted by using the Following HTML element.
<object data=”data:application/xsilverlight2,” type=”application/xsilverlight2″ width=”100%” height=”100%”>
<param name=”source” value=”ClientBin/MyApp.xap”/>
<param name=”onError” value=”onSilverlightError” />
<param name=”background” value=”white” />
<param name=”minRuntimeVersion” value=”4.0.50401.0″ />
<param name=”autoUpgrade” value=”true” />
<param name=”initParams” value=”InitKey=<%=Session[“modKey”] %>” />
</object>
The App.xaml.cs file contains the following code segment. (Line numbers are included for reference only.)

01 private void Application_Startup(object sender, StartupEventArgs e)
02 {
03
04 }

You need to retrieve the value of the modKey session variable in the Startup event handler.
Which code segment should you insert at line 03?

Which code segment should you insert at line 11?

You are developing an outofbrowser application by using Silverlight 4. The application contains the following code segment. (Line numbers are included for reference only.)

01 public partial class App : Application
02 {
03 public App()
04 {
05 this.Startup += this.Application_Startup;
06 InitializeComponent();
07 }
08 void Application_Startup(object sender, StartupEventArgs e)
09 {
10 this.RootVisual = new MainPage();
11
12 }
13 }

You need to ensure that when a new version of the application is available, it is automatically installed and the user is notified.
Which code segment should you insert at line 11?

Which code segment should you insert at line 11?

You are developing a Silverlight 4 application. The application contains the following code segment. (Line numbers are included for reference only.)

01 public partial class App : Application
02 {
03 public App()
04 {
05 this.UnhandledException += this.AppUnhandledException;
06 InitializeComponent();
07 }
08
09
private void AppUnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
10 {
11
12 }
13 }
You need to ensure that unhandled exceptions in the application are prevented from being thrown to the page that hosts the application. Which code segment should you insert at line 11?


Page 7 of 10« First...56789...Last »