Which XAML fragment should you use to replace line 02?
You are developing a Silverlight 4 application. You have a resource dictionary contained in a file named myDictionary.XAML that is embedded in a separate assembly named
myResources.dll. The App.XAML file contains the following XAML fragment. (Line numbers are included for refer ence only.)
01 <Application.Resources>
02 <ResourceDictionary Source=”Assets/Styles.xaml”/>
03 </Application.Resources>
You need to add the myDictionary.XAML file to the resource dictionaries in the application. Which XAML fragment should you use to replace line 02?
Which background color will be displayed on the Grid?
You are developing a Web application by using Silverlight 4 and Microsoft Visual Studio 2010. You have three resource dictionaries named OrangeSkin.XAML, GraySkin.XAML, and
GreenSkin.XAML. Each dictionary has a SolidBrush style and uses the same x:key name of MyBrush. The three resource dictionaries define the color of MyBrush as follows:
OrangeSkin.XAML defines the color of MyBrush as Orange.
GraySkin.XAML defines the color of MyBrush as Gray.
GreenSkin.XAML defines the color of MyBrush as Green.
You have a control that merges the dictionaries by using the following XAML fragment.
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source=”OrangeSkin.xaml” />
<ResourceDictionary Source=”GraySkin.xaml” />
<ResourceDictionary Source=”GreenSkin.xaml” />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key=”MyBrush” Color=”Azure”/>
</ResourceDictionary>
</UserControl.Resources>
<Grid x:Name=”LayoutRoot” Background=”{StaticResource MyBrush}”>
</Grid>
Which background color will be displayed on the Grid?
Which XAML fragment should you insert between lines 06 and 07?
You are developing an application by using Silverlight 4 and Microsoft .NET Framework 4. The application contains the following XAML fragment. (Line numbers are included for reference only.)
01 <Grid x:Name=”LayoutRoot” Background=”White”>
02 <Grid.Resources>
03 <vm:Customers x:Key=”CustomerVM”/>
04 <vm:MockCustomers x:Key=”MockCustomerVM”/>
05 </Grid.Resources>
06 <sdk:DataGrid AutoGenerateColumns=”True”
07 ItemsSource=”{Binding CustomerList}” />
08 </Grid>
You need to bind the DataGrid to the CustomerList property in MockCustomerVM at design time. You also need to bind the DataGrid to the CustomerList property in CustomerVM at run time. Which XAML fragment should you insert between lines 06 and 07?
What should you do?
You are developing a Silverlight 4 application. The application has a page that contains a Slider control named sldAmount. You need to enable the wheel of the mouse to control sldAmount. What should you do?
What should you do?
You are developing a Silverlight 4 application. You handle the RightMouseButtonDown event of the applications layout root element to display a shortcut menu. You discover that when the right mouse button is released, the standard information panel in Silverlight appears. You need to prevent the standard information panel in Silverlight from being displayed.
What should you do?
Which two actions should you perform?
You are developing a trusted application by using Silverlight 4. The application will upload images to a server. You need to provide a user with two ways to select an image file from the C:\Temp folder on the client computer.Which two actions should you perform?
(Each correct answer presents a complete solution. Choose two.)
Which two actions should you perform?
You are developing a Silverlight 4 application. The application contains a form that has a Grid control and several input fields. The data context is bound to an object that implements validation. You need to display a summary of validation errors. Which two actions should you perform?
(Each correct answer presents part of the solution. Choose two.)
Which XAML fragment should you use?
You are developing a Silverlight 4 application. The application contains a TextBox control data bound to a class that implements only the INotifyPropertyChanged interface. When an invalid value is entered in the TextBox control, the class will throw a ValidationException in the Set block of its Name property. You need to display the validation error when an invalid value is entered in the TextBox control. Which XAML fragment should you use?
Which XAML fragment should you use?
You are developing a Silverlight 4 application. The application contains an OrderItem class that has a public interface property named Quantity and a public Decimal property named UnitPrice. The application also contains an ExtendedPriceConverter class that calculates the total price for the OrderItem. The application requires a UnitPrice in the value of the converter and a Quantity as the parameter. You create an XAML page that contains a TextBlock control. The converter is defined in the page that contains the following XAML fragment. (Line numbers are included for reference only.)
01 <UserControl.Resources>
02 <converters: ExtendedPriceConverter x:Key=”epc”></converters: ExtendedPriceConverter>
03 </UserControl.Resources>
You need to ensure that the TextBlock control uses ExtendedPriceConverter to display the extended price when bound to an OrderItem. Which XAML fragment should you use?
Which two tasks should you perform?
You are developing a Silverlight 4 application. The application contains a Product class that has a publicBooleanpropertynamed IsAvailable. The application also contains a BoolToVisibilityConverter class. You create an XAML page that contains a Button control. The page is data bound to an instance of the Product class. You need to ensure that the Button control is visible only if the IsAvailable property is true. Which two tasks should you perform?
(Each correct answer presents part of the solution. Choose two.)