Adding a datatemplate to a listbox seems to break the automatic "startswith" search. I was hoping that overriding ToString() might help, but it doesn't seem to.
Can anybody point me in the right direction?
Thanks
class ItemVM
{
public StyleDefinition Style { get; set; }
public string TagText { get; set; }
public override string ToString()
{
return Style.Description;
}
}
<telerik:RadListBox
SelectionMode="Single"
TextSearchMode="StartsWith">
<telerik:RadListBox.ItemTemplate>
<DataTemplate>
<DockPanel>
<TextBlock Text="{Binding Style.DisplayName}" />
<TextBlock Text="{Binding TagText}" HorizontalAlignment="Right"/>
</DockPanel>
</DataTemplate>
</telerik:RadListBox.ItemTemplate>
</telerik:RadListBox>