← About Jeff

What's new with the Silverlight AutoCompleteBox

March 24, 2009

SilverlightIf you downloaded and installed the excellent Silverlight Toolkit March 2009 release, you probably noticed that there were some cosmetic assembly name and namespace changes. You might also be wondering, "where is the AutoCompleteBox?" Here's some information on the changes in the latest March 2009 release of the control, including the binding improvements we made to the API surface area. The control is currently in the "Stable" quality band, as defined by the Silverlight Toolkit, and is tracking towards a "Mature" release in the coming months given the open issues, test efforts and coverage, and general feedback. These changes are available in both the Silverlight 2 and Silverlight 3 builds of the control.

Design time experience

You'll find the AutoCompleteBox automatically in Visual Studio's Toolbox and Expression Blend 3's Asset Library.

Binding improvements

SelectedItem can be two-way bound

The SelectedItem property is now settable. Previously it was a read-only dependency property, not exactly helping with data binding scenarios.

Converter trio replaced with a great ValueMemberBinding property

The somewhat confusing requirement for either overriding the ToString method on bound objects, or using the entire "Converter story" (an IValueConverter and trio of properties) is gone, replaced by a ValueMemberBinding property. Any existing value converters will work by specifying the binding with that converter set inside it. This enables a clean XAML-only method of setting the binding to use to select the text value for a data object. For instance, a business object with properties "Name", "City", and "State", could set the XAML value to {Binding Name}, without having to write any converter.

Where the AutoCompleteBox is now

The control lives in the Silverlight Toolkit still for Silverlight 2 development, and has been moved into the Silverlight 3 SDK. The move into the SDK is a great win for developers, as the SDK is available to many developers. The AutoCompleteBox for Silverlight 3 also benefits from the extension caching story in the platform, as an official SDK control. I do still strongly recommend that you download, use, and embrace the Silverlight Toolkit, because there's new hotness like an area series for charting, an accordion control, and an installer that make it really, really to use.

Silverlight 2

Assembly: System.Windows.Controls.Input.Toolkit Shipping in: Silverlight Toolkit Namespace: System.Windows.Controls Former location: Microsoft.Windows.Controls (namespace and assembly)

Silverlight 3 Beta

Assembly: System.Windows.Controls.Input Shipping in: Silverlight 3 Beta SDK Namespace: System.Windows.Controls

What next?

We have a number of open issues for the control, thanks to CodePlex and the internal Microsoft bug database, that are being triaged and addressed. The next official AutoCompleteBox release will be with the next Silverlight 3 SDK release. Hope you enjoy the new improvements to binding in this control.