TextSearch.TextPath Attached Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name of the items' property that identifies each item in a control's collection.
see GetTextPath, and SetTextPath
see GetTextPath, and SetTextPath
see GetTextPath, and SetTextPath
Examples
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" TextSearch.TextPath="Name">
<Image Name="Cat" Source="data\cat.png"/>
<Image Name="Dog" Source="data\dog.png"/>
<Image Name="Fish" Source="data\fish.png"/>
</ComboBox>
Remarks
Use this property on a control that contains a collection of items. The value of the specified property is the text that the user can type to select the item, and the text that is displayed if the control is set to display text in its TextBox. If you set the Text property on a control's collection item, the TextPath property will be ignored. If you set the TextPath property to a value that is not the name of an actual property, TextPath is ignored.
Dependency Property Information
Identifier field | TextPathProperty |
Metadata properties set to true |
None |
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈