You are developing a Windows Presentation Foundation (WPF) application that displays financial data. The following style is applied to every Label control that displays currency.
<Style x:Key = “CurrencyLabel”
BasedOn=”{StaticResource {x:Type Label}}”
TargetType=”{x:Type Label}”>
<Setter Property = “Template”>
<Setter.Value>
</Setter.Value>
</Setter>
</Style>
You need to ensure that the style is updated to meet the following requirements regarding currency:
– It must be right aligned
– It must display the number with the regional currency settings
A.
<ControlTemplate TargetType = “{x:Type Label}”>
<ContentPresenter HorizontalAlignment = “Right” ContentStringFormat=”{}{0:C}”>
</ControlTemplate>
B.
<ControlTemplate>
<ContentPresenter HorizontalAlignment = “Right” ContentStringFormat = “{}{0:C}”/>
</ControlTemplate>
C.
<ControlTemplate TargetType = “{x:Type Label}”>
<Label HorizontalAlignment = “Right” Content = “{Binding StringFormat = {}{0:C}}”/>
</ControlTemplate>
D.
<ControlTemplate>
<Label HorizontalAlignment = “Right” Content = “{Binding StringFormat = {}{0:C}}”/>
</ControlTemplate>
Explanation:
A or B