Microsoft
70-511 · Question #11
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:Naitie= "styleItalic"…
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:Naitie= "styleItalic" TargetType="{x:Type Button}"> <Setter Property="FontStyle" Value="Italic"/> </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
(68 responses)- A9% (6)
- B4% (3)
- C84% (57)
- D3% (2)
Community Discussion
No community discussion yet for this question.