This question is locked. New answers and comments are not allowed.
Hello.
I need help how to set to autocompletebox own itemTeplate like in ComboBox in normal Windows 8 controls.
I have Customer class object with property Name and CustomerNo and need both to show in this box. And also need to search in both of these properties. I looked at documentation, but there is nothing about it.
I try this
In code is used:
I need help how to set to autocompletebox own itemTeplate like in ComboBox in normal Windows 8 controls.
I have Customer class object with property Name and CustomerNo and need both to show in this box. And also need to search in both of these properties. I looked at documentation, but there is nothing about it.
I try this
<DataTemplate x:Key="CustomerItemTemplate"> <Grid> <StackPanel Grid.Column="1" Margin="10,0,0,0" Orientation="Horizontal"><TextBlock Text="{Binding CustomerNo}" Style="{StaticResource ItemTextStyle}" TextWrapping="NoWrap" FontSize="20" > </TextBlock> <TextBlock Text="{Binding Name}" Style="{StaticResource ItemTextStyle}" TextWrapping="NoWrap" FontSize="20" Margin="20,0,0,0" /> </StackPanel> </Grid> </DataTemplate>In code is used:
<Input:RadAutoCompleteBox x:Name="customerCombo" Watermark="Select Customer" Margin="0" Height="50" SelectionChanged="CustomerAutoSelect" FilterMode="Contains" Padding="10,10,10,0" FontSize="18" ItemTemplate="{StaticResource CustomerItemTemplate}" />
But it crash application. At normal ComboBox it works.
Thank You for Answer.
Vlada