题目内容 (请给出正确答案)
[主观题]

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) appli

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.The application contains a composite user control that includes a TextBox control named txtInput.The user control will be hosted in a window and will have handlers for the text-changed event of txtInput.You need to ensure that the application meets the following requirements:Creates a text-changed event handler named Audit_TextChanged for the txtInput control.Executes Audit_TextChanged even when specific handlers mark the event as handled.Which code segment should you add to the constructor of the user control?()

A.txtInput.TextChanged+=Audit_TextChanged;

B.AddHandler(TextBox.TextChangedEvent, new RoutedEventHandler(Audit_TextChanged), true);

C.EventManager.RegisterClassHandler(typeof(TextBox), TextBox.TextChangedEvent, new RoutedEventHandler(Audit_TextChanged), true);

D. EventManager.RegisterClassHandler(typeof(TextBox), TextBox.TextChangedEvent, new RoutedEventHandler (Audit_TextChanged), false);

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“You use Microsoft .NET Framewo…”相关的问题

第1题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.The application contains an ObservableCollection object named Pictures that contains several Picture objects.Each Picture object contains the Name and PictureFilePath properties.You add a ListBox control to the application.You need to ensure that the pictures are displayed in the ListBox control.Which code fragment should you use?()

A.

B.

C.

D.

点击查看答案

第2题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that allows users to arrange images.You need to ensure that users can arrange child elements in a panel without affecting the size of the elements.You also need to ensure that child elements are oriented horizontally.Which control should you use?()

A.ListBox

B.DockPanel

C.WrapPanel

D.StackPanel

点击查看答案

第3题

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.

点击查看答案

第4题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList.The number of items of the data-bound collection is fixed. However, users can modify the properties of each of the Product objects in the collection.You need to ensure that changes made on the Product objects are automatically reflected in the ListBox control.What should you do?()

A.Implement the INotifyPropertyChanged interface in the Product class.

B.Implement the INotifyCollectionChanged interface in the ProductList class.

C.Set the Mode property of the Binding object of the ListBox control to TwoWay.

D. Set the UpdateSourceTrigger property of the Binding object of the ListBox control to PropertyChanged.

点击查看答案

第5题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList.You need to ensure that changes to ProductList are automatically reflected in the ListBox control.What should you do? ()

A. Implement the INotifyPropertyChanged interface in the Product class.

B. Implement the IQueryable<Product> interface in the ProductList class.

C. Extend the DependencyObject class in the Product class.

D.Extend the ObservableCollection<Product> class in the ProductList class.

点击查看答案

第6题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.You add a TreeView control to show the hierarchical structure of orders and order details.Each order contains an ObservableCollection named OrderDetails.You write the following code fragment. (Line numbers are included for reference only.)You need to ensure that the TreeView control meets the following requirements:Each order is shown as a TreeView node.The order nodes have order detail nodes as children.The order detail nodes have no children.Which code fragment should you insert at line 07?()

A.

B.

C.

D.

点击查看答案

第7题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.You write the following code fragment.You create an event handler named StackPanel_PreviewTextInput. You also have a collection of strings named Keywords.You need to ensure that TxtBoxA and TxtBoxB do not contain any of the strings in the Keywords collections.Which code segment should you use?()

A.

B.

C.

D.

点击查看答案

第8题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.You declare a class named PictureContainer that has a property named Photo.The Photo property is of the byte[] type and contains an image in the JPEG format.You assign a collection of the PictureContainer elements to the current DataContext.You need to create a ListBox control that displays the images.Which code fragment should you use?()

A.

B.

C.

D.

点击查看答案

第9题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.The application uses the background worker process (BWP).When the user clicks a button,the background worker executes a method named DoCalculations asynchronously.You need to implement a progress bar on the user interface (UI) that informs the user of the progress of DoCalculations.Which two actions should you perform?()

A.Modify the Value property of the progress bar in DoCalculations.

B.Modify the Value property of the progress bar in the ProgressChanged event handler of the background worker.

C.Modify the Value property of the progress bar in the RunWorkerCompleted event handler of the background worker.

D.Call the ReportProgress method of the background worker in DoCalculations.

E.Call the ReportProgress method of the background worker in the DoWork event handler of the background worker.

点击查看答案

第10题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application named MyApp.exe.You use Microsoft Windows Installer to package the application.You create an icon file named Application.ico.You need to associate Application.ico with MyApp.exe when it is deployed.What should you do?()

A.Use the File Types Editor tool.

B.Rename the icon file to MyApp.exe .ico.

C.Set the AddRemoveProgramsIcon property to Application.ico.

D.Use the File System Editor tool to set the Icon property to Application.ico.

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信