单项选择题

You use Microsoft .NET Framework 4 to create a Windows Forms application. 
You need to allow the user interface to use the currently configured culture settings in the Control Panel. 
Which code segment should you use?()

A. Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
B. Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture;
C. Thread.CurrentThread.CurrentUICulture = CultureInfo.InstalledUICulture; 
D. Thread.CurrentThread.CurrentCulture = CultureInfo.InstalledUICulture;


您可能感兴趣的试卷

你可能感兴趣的试题

6.多项选择题

You use Microsoft .NET Framework 4 to create a Windows Forms application. 
You add a new class named Customer to the application.  
You select the Customer class to create a new object data source. 
You add the following components to a Windows Form: 
A BindingSource component named customerBindingSource that is data-bound to the Customer object data source.
A set of TextBox controls to display and edit the Customer object properties.
Each TextBox control is data-bound to a property of the customerBindingSource component. 
An ErrorProvider component named errorProvider that validates the input values for each TextBox control. 
You need to ensure that the input data for each TextBox control is automatically validated by using the ErrorProvider component. 
Which two actions should you perform?()

A. Implement the validation rules inside the Validating event handler of each TextBox control by throwing an exception when the value is invalid.
B. Implement the validation rules inside the TextChanged event handler of each TextBox control by throwing an exception when the value is invalid.
C. Implement the validation rules inside the setter of each property of the Customer class by throwing an exception when the value is invalid.
D. Add the following code segment to the InitializeComponent method of the Windows Form.   this.errorProvider.DataSource = this.customerBindingSource;
E. Add the following code segment to the InitializeComponent method of the Windows Form.    this.errorProvider.DataSource = this.customerBindingSource.DataSource;    this.errorProvider.DataMember = this.customerBindingSource.DataMember;

9.单项选择题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. 
You want to add an audio player that plays .wav or .mp3 files when the user clicks a button.  
You plan to store the name of the file to a variable named SoundFilePath. 
You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays. 
What should you do?()

A. Write the following code segment in the button onclick event.     System.Media.    SoundPlayer player = new System.Media.    SoundPlayer(SoundFilePath); player.play();
B. Write the following code segment in the button onclick event.    MediaPlayer player = new MediaPlayer();     player.Open(new URI(SoundFilePath),    UriKind.Relative)); player.play();
C. Use the following code segment from the PlaySound()    Win32 API function and call the PlaySound function in the button onclick event.    [sysimport(dll="winmm.dll")]     public static extern long PlaySound(String SoundFilePath, long hModule, long dwFlags);
D. Reference the Microsoft.DirectX Dynamic Link Libraries.     Use the following code segment in the button onclick event.     Audio song = new Song(SoundFilePath);     song.CurrentPosition = song.Duration; song.Play();

10.单项选择题

You create a Windows client application by using Windows Presentation Foundation (WPF). 
The application contains the following code fragment.

You need to assign lbDetails to use the detail data template when btnDetails is clicked. 
Which code segment should you write for the click event handler for btnDetails?()

A. lbDetails.ItemsPanel.FindName("detail",lbDetails);
B. var tmpl = (ControlTemplate)FindResource("detail");    lbDetails.Template = tmpl; 
C. var tmpl = (DataTemplate)FindName("detail");    lbDetails.ItemTemplate = tmpl;
D. var tmpl = (DataTemplate)FindResource("detail");    lbDetails.ItemTemplate=tmpl;

最新试题

The UI is not being updated when the Data property is set.You need to ensure that the DisplayData class correctly updates the UI when the Data ..What should you do ?() 

题型:单项选择题

You create a Windows client application by using Windows Presentation Foundation (WPF). The application contains the following code fragment.You need to assign lbDetails to use the detail data template when btnDetails is clicked. Which code segment should you write for the click event handler for btnDetails?()

题型:单项选择题

You are developing a Windows Presentation Foundation (WPF) application.The application contains stylized body text and heading text. The heading text is a slight variation of the body text.You need to ensure that if the body text changes, the heading text automatically inherits those changes.What should you do ?()

题型:单项选择题

You need to ensure that phone numbers are displayed in the following format : (###) ### - ###Which markup segment should you use ?()

题型:单项选择题

You are developing a user control for Windows Presentation Foundation (WPF) application.The user control contains a button. Both the user control and the hosting control must receive the button click event.You need to ensure that the user control responsd to the button click event before hosting control responds to the event.What should you do ?()

题型:单项选择题

You are developing WPF application for managing student information... btnSort and a DataGrid control named dgStudents on the design surface of the MainWindow.xaml properties : FirstName and LastName. You create the following code segment in the constructor of...The DataGrid control displays the list of students unsorted.You need to ensure that the list of students is sorted by last name.Which code segment should you add to the click event handler of the Button control?()

题型:单项选择题

You are developing a Windows Forms application that contains a DataGridView control. The DataGridView capture the customer's name, address, and phone number.You have been asked to provide data validation in a DataGridView to prevent users from leaving the..You need to ensure that users cannot tab out of the name field without entering dataWhat should you do ?()

题型:单项选择题

You are developing a Windows Presentation Foundation (WPF) application. All of the application styles are in the file name Themes.dllYou have the followiing markup segment.BlueBackground is defined in a XAML file named BlueTheme.xaml. The XAML markup is compiled into the Themes.dll file.You need to ensure that the XAML file is referenced so that the application can apply the settings in the BlueBackground style.()

题型:单项选择题

You are developing a Windows Presentation Foundation (WPF) application.You need to display HTML content from a Web Page on the WPF form. What should you do?()

题型:单项选择题

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?()

题型:单项选择题