I use RadComboBox in Silverlight. I got the binding data from somewhere. The question is when I click the dropdown arrow to close the menu but the text selected is not focused or highlighted.
I have LostFocus, DropDownOpened and SelectionChanged events for this RadComboBox. I put the code
System.Windows.Browser.HtmlPage.Plugin.Focus();
this.comboBox.Focus();
in either of these events.
But the selected text in the drop down menu can not be focused(hightlighted). Maybe it can not be achieved inside its own events?
EDIT:
Code:
<RadComboBox
Grid.Column="2"
Grid.Row="12"
x:Name="fileLocDropDown"
LostFocus="FileLocDropDown_LostFocus"
KeyDown="FileLocDropDown_KeyDown"
DropDownOpened="FileLocationDropDown_DropDownOpened"
IsEditable="True"
CanAutocompleteSelectItems="True"
IsUpperCase="True"
MaxDropDownHeight="600"
IsTextSearchEnabled="True"
Text="{Binding FileLocCode,Mode=TwoWay, Converter={StaticResource NullValueConverter},ConverterParameter='Text',NotifyOnValidationError=True}"
MaxLength="3"
SelectionChanged="FileLocDropDown_SelectionChanged"
ItemsSource="{Binding FileLocList}">
<RadComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Background="LightYellow" >
<TextBlock Margin="4,0,4,0" HorizontalAlignment="Left" Text="{Binding FileLocCode}" Width="30" />
<TextBlock Margin="4,0,4,0" HorizontalAlignment="Left" Text="{Binding FileLocName}" Width="150" />
</StackPanel>
</DataTemplate>
</RadComboBox.ItemTemplate>
Image:

On your RadComboBox set the following values:
This should give you the behaviour you want, although it does mean that users will be able to enter whatever random text into the input field, so you may need to handle this.
EDIT: Create a new property in the class that FileLocList contains, which concatenates the FileLocCode and FileLocName strings (with a line break in there I guess if you want to replicate the stackpanel's effect).
Then, get rid of the ItemTemplate and hook up DisplayMemberPath to your new string instead.