单项选择题
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation
Framework (WPF) application.
You have a page named myPage that contains the following code fragment.
You need to ensure that other pages in your application can use CustomerNameBrush.
What should you do? ()
A. Move CustomerNameBrush to the App.xaml file.
B. Inherit from myPage in all additional pages that use CustomerNameBrush.
C. Add a reference to myPage to all additional pages that use CustomerNameBrush.
D. Bind controls that need CustomerNameBrush to myPage.Resources.CustomerNameBrush.
相关考题
-
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains the following code fragment. Hello World Ok You need to define a style that applies the following properties to the text in the StackPanel object: FontSize = 32 FontWeight = Bold Which code fragment should you use?()
A.
B.
C.
D. -
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. You need to ensure that the style is applied to all labels within the application. What should you do?()
A. Add the style to the <Grid.Resources> section of the main window.
B. Add the style to the <Window.Resources> section of the main window.
C. Add the style to the <Application.Resources> section of the App.xaml file.
D. Add the style to the <Application.Properties> section of the App.xaml file.
E. Add the style to the <ResourceDictionary> section of the ResourceDictionary.xaml file. -
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a window that has two labels named First and Second. You need to display the label named First in blue. Which code fragment should you use?()
A.
B.
C.
D.
