You are employed as an application developer at ABC.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
ABC.com has an application that contains StackPanel object named ABCStyle. The text font in the
StackPanel object is currently undefined.
You have been instructed to write code that sets the font size to 28, but the font weight must be
retained.
Which of the following actions should you take?
A.
You should consider writing the code shown below:
<Style x:Key=”ABCStyle” TargetType=”{x:Type Control}”>
<Setter Property=”TextElement.FontSize” Value=”28″ />
</Style>
B.
You should consider writing the code shown below:
<Style x:Key=”ABCStyle” TargetType=”{x:Type FrameworkElement}”>
<Setter Property=”TextElement.FontSize” Value=”28″ />
</Style>
C.
You should consider writing the code shown below:
<Style x:Key=”ABCStyle” TargetType=”{x:Type TextElement}”>
<Setter Property=”Control.FontSize” Value=”28″ />
</Style>
D.
You should consider writing the code shown below:
<Style x:Key=”ABCStyle” TargetType=”{x:Type UserControl}”>
<Setter Property=”Control.FontSize” Value=”28″ />
</Style>
Explanation: