c# - AutoSuggestBox query selected textbox -
i using autosuggestbox control display results, such:
<autosuggestbox width="192" placeholdertext="search" horizontalalignment="right" itemssource="{binding searchresults}"> <i:interaction.behaviors> ... </i:interaction.behaviors> <autosuggestbox.itemtemplate> <datatemplate> <textblock> <run text="{binding name}" /> <run text="(" /><run text="{binding origin_country[0]}" /><run text=")" /> </textblock> </datatemplate> </autosuggestbox.itemtemplate>
searchresults (itemssource binding) defined such:
private observablecollection<showmodel> _searchresults = default(observablecollection<showmodel>); public observablecollection<showmodel> searchresults { { return _searchresults; } set { set(ref _searchresults, value); } }
and showmodel basic model bindable properties.
the problem i'm having when i'm clicking on 1 of results, filling textbox path of model, seen below:
what want define sort of template textbox bind 1 of model's properties model path not displayed. possible?
set textmemberpath
property 1 of model's properties want display.
textmemberpath="someproperty"
Comments
Post a Comment