Microsoft
70-511 · Question #126
You are developing a Windows Presentation Foundation (WPF) application. You have the following style defined in the app.xaml file. <Style x:Key="btnItalic" x:Name="styIeItalic" TargetType="{ x:Type…
The correct answer is C. button1.Style =. See the full explanation below for the reasoning.
Question
You are developing a Windows Presentation Foundation (WPF) application. You have the following style defined in the app.xaml file. <Style x:Key="btnItalic" x:Name="styIeItalic" TargetType="{ x:Type Button}"> Setter Property="FontStyle" Value="Itallc"/> </Style> You need to apply this style to a button named button1 in the application at run time. Which code segment should you use?
Options
- Abutton1.Style =
- Bbutton1.Style =
- Cbutton1.Style =
- Dbutton1.Style =
How the community answered
(33 responses)- A3% (1)
- B9% (3)
- C73% (24)
- D15% (5)
Community Discussion
No community discussion yet for this question.