You need to ensure that the window responds while users type a name

You are creating a Windows Presentation Foundation (WPF) application by using Microsoft
.NET Framework 4 and Microsoft SQL Server 2008. You create a window that allows users
to search for products that match a given name. Search results are displayed when the user
types each letter of the product name. You use a method named FindProducts to obtain the
list of products. Users report that when they type a letter of the product name, the window
stops responding for a varying amount of time. While the window stops responding, users
cannot type more letters. The window stops responding even when the search generates
few results. You need to ensure that the window responds while users type a name. What
should you do?

You are creating a Windows Presentation Foundation (WPF) application by using Microsoft
.NET Framework 4 and Microsoft SQL Server 2008. You create a window that allows users
to search for products that match a given name. Search results are displayed when the user
types each letter of the product name. You use a method named FindProducts to obtain the
list of products. Users report that when they type a letter of the product name, the window
stops responding for a varying amount of time. While the window stops responding, users
cannot type more letters. The window stops responding even when the search generates
few results. You need to ensure that the window responds while users type a name. What
should you do?

A.
Use a VirtualizingStackPanel class to display the list of client applications that match the
given name.

B.
Create a delegate for the FindProducts method. Pass the delegate to the Invoke method
of the Dispatcher property of the window.

C.
Cache the results returned by the FindProducts method for each set of criteria.

D.
Before you call the FindProducts method, call the Freeze method on the Brush object
that is used as the Background property of the window.



Leave a Reply 0

Your email address will not be published. Required fields are marked *