Available in LIB version 2016.3.1017, it will be also available in the 2016 R3 SP1 release.
If you set IsEnabled = false, in the RadComboBox then (in the Office 2016 theme) the entire box is faded, including the text. A suggestion in the forum was to set IsHitTestVisible to false, as well as IsTabStop. This works, but it means that the dropdown button still looks enabled. It would be nice if IsReadOnly did what I wanted, but it doesn't. Therefore, either a way to set the Visibility/Opacity of the dropdown button. Or alternatively, modify the theme(s) to make the text more visible when the box is IsEnabled is set to false, in the same way as the standard ComboBox. I'm aware that I can modify the template myself, but it'd be nicer if it was built in.
The following xaml code
<telerik:RadComboBox Margin="5"
ItemsSource="{Binding Path=AvailableServices}"
IsEditable="True"
Text="{Binding Path=Service, Mode=TwoWay}"/>
<ComboBox Margin="5"
ItemsSource="{Binding Path=AvailableServices}"
IsEditable="True"
Text="{Binding Path=Service, Mode=TwoWay}"/>
with this view model
public class ViewModel {
public ObservableCollection<string> AvailableServices { get; set; } = new ObservableCollection<string> { "UPS Standard", "UPS Express Saver", "UPS Express 12:00", "UPS Express" };
public string Service { get; set; } = "UPS Express";
}
produces the attached output.
The standard WPF ComboBox is set to "UPS Express" as expected while the RadComboBox shows "UPS Express Saver" which probably was incorrectly autocompleted.
When the theme variation is changed in the VisualStudio2013 theme, the mouse over color is not updated.
As a workaround, we can reset the Template of the RadComboBox.
var template = this.comboBox.Template;
this.comboBox.Template = null;
this.comboBox.Template = template;
The "{" character cannot be entered in the RadComboBox when the keyboard is German (Swiss).
As a wokaround, you can inherit the RadComboBox and override the HandleKeyDown method:
public class CustomRadComboBox : RadComboBox
{
protected override bool HandleKeyDown(Key systemKey, int platformKeyCode)
{
if(systemKey == Key.Oem5)
{
return false;
}
return base.HandleKeyDown(systemKey, platformKeyCode);
}
}
Setting the Background property of RadComboBox no longer changes the background color of the control.
To work this around, you can add a global event handler for the Loaded event of RadComboBox and set the corresponding backgrounds in code.
static MainWindow()
{
EventManager.RegisterClassHandler(typeof(RadComboBox), RadComboBox.LoadedEvent, new RoutedEventHandler(OnComboBoxLoaded));
}
private static void OnComboBoxLoaded(object sender, RoutedEventArgs e)
{
var comboBox = (RadComboBox)sender;
if (!comboBox.IsEditable)
{
if (comboBox.IsEnabled)
{
var buttonChrome = comboBox.FindChildByType<ButtonChrome>();
buttonChrome.Background = Brushes.Purple;
}
else
{
comboBox.Background = Brushes.Purple;
}
}
}
The selected items of the RadComboBox will not be displayed correctly if the ItemsSource is bound to a collection of enums that are converted via a custom EnumConverter.
Currently, you could work around this behavior by implementing a custom DataTemplate for the MultipleSelectionBoxTemplate property of RadComboBox:
<telerik:RadComboBox x:Name="comboBox"
AllowMultipleSelection="True">
<telerik:RadComboBox.MultipleSelectionBoxTemplate>
<DataTemplate>
<ItemsControl ItemsSource="{Binding ElementName=comboBox, Path=SelectedItems}"
AlternationCount="{Binding RelativeSource={RelativeSource Self}, Path=Items.Count}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="commaTextBlock" Text=", "/>
<TextBlock Text="{Binding}" HorizontalAlignment="Left"/>
</StackPanel>
<DataTemplate.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Visibility" TargetName="commaTextBlock" Value="Collapsed" />
</Trigger>
</DataTemplate.Triggers>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</DataTemplate>
</telerik:RadComboBox.MultipleSelectionBoxTemplate>
</telerik:RadComboBox>
The exception message is the following: System.ArgumentException: 'The value '102' is not a valid value for the enum 'FilterOperator'.'
To work this around, avoid using mixed typed values in the ItemsSource.