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?

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?

A.
Azure

B.
Gray

C.
Green

D.
Orange



Leave a Reply 0

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