Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TextSearch.Text Attached Property

Gets or sets the string that identifies an item in a control's collection.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in PresentationFramework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

See TextSearch.GetText, TextSearch.SetText
See TextSearch.GetText, TextSearch.SetText
See TextSearch.GetText, TextSearch.SetText
<object TextSearch.Text="string" .../>

Property Value

The text that identifies the item to the user. The default value is an empty string.

Identifier field

TextProperty

Metadata properties set to true

None

This property specifies the text to displayed when an item is selected, and enables the user to select an item by typing the value of this property. As soon as the user types enough of the value to distinguish the item from other items in the selection, the item will be selected. Use this property on an item in a collection.

The following example creates a ComboBox that contains images as items instead of text. The IsEditable property is set to true, so text is displayed when one of the images is selected.

<ComboBox IsEditable="true">
      <Image TextSearch.Text="Cat" Source="data\cat.png"/>
      <Image TextSearch.Text="Dog" Source="data\dog.png"/>
      <Image TextSearch.Text="Fish" Source="data\fish.png"/>
</ComboBox>

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft