TextSearch.Text 附加屬性

定義

取得或設定識別控制項集合中項目的字串。

see GetText, and SetText
see GetText, and SetText
see GetText, and SetText

範例

下列範例會建立 , ComboBox 其中包含影像做為專案,而不是文字。 屬性 IsEditable 會設定為 true ,因此選取其中一個影像時會顯示文字。

<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>

備註

此屬性會指定要在選取專案時顯示的文字,並讓使用者輸入此屬性的值來選取專案。 一旦使用者輸入足夠的值來區分專案與選取範圍中的其他專案,就會選取該專案。 在集合中的專案上使用這個屬性。

相依性屬性資訊

識別碼欄位 TextProperty
中繼資料屬性設定為 true BindsTwoWayByDefault

適用於

另請參閱