单项选择题
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 has a window named MainWindow that has a StackPanel control named sp as the root element. You want to create a Button control that contains a TextBlock control with the "Save" Text property. You need to create the control dynamically and add the control to sp. Which code segment should you write in the constructor of the MainWindow class?()
A.
B.
C.
D. -
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that displays an image. You need to ensure that users can stretch and scale the image. Which control should you use?()
A. Frame
B. Slider
C. Viewbox
D. ScrollViewer -
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that users can view content in a book-reading format that displays two pages at a time. Which control should you use?()
A. FlowDocument
B. FlowDocumentReader
C. FlowDocumentPageViewer
D. FlowDocumentScrollViewer
