The problem is that when you have SearchMode=Contains , and have item that contains the entered text and one that starts with this text, the ComboBox selects the one which contains the text(as it is with smaller index) but scrolls to the one that starts with it.
Create a RadComboBox, bound to a collection of objects, implementing INotifyPropertyChanged. Use DisplayMemberPath. Select an item, then change the display member property of the selected item - the selection box is not updated. As workaround you can use DataTemplate: <telerikInput:RadComboBox HorizontalAlignment="Left" Margin="122,52,0,0" VerticalAlignment="Top" MinWidth="150" x:Name="radComboBox" telerik:TextSearch.TextPath="Name"> <telerikInput:RadComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Name}" /> </DataTemplate> </telerikInput:RadComboBox.ItemTemplate> </telerikInput:RadComboBox>
The OnLostFocus is triggered when the control gets the focus and is not triggered after the focus is lost. The current call stack is as follows: - The control gets the focus - OnGotFocus is hit - OnLostFocus is hit incorrectly - The focus is removed from the control - The OnLostFocus is not hit and it should be As a workaround you can hook to these events in the constructor of the custom ComboBox: public MyRadComboBox() { this.GotFocus += MyRadComboBox_GotFocus; this.LostFocus += MyRadComboBox_LostFocus; }
Available in the R1 2017 SP1 Release.
It looks like the `Fluent` themes may not properly theme the Non-Editable RadComboBox control.
Within the default style for RadComboBox within Telerik.Windows.Controls.Input.xaml, there exists a RadToggleButton with the name "PART_DropDownButton" which is part of the main control template. This toggle button uses the style "NonEditableComboToggleButtonStyle", which then sets the toggle button template to the "NonEditableComboToggleButtonControlTemplate" control template.
This control template has a Border named "ToggleButtonBackground" where to background is set to a template binding. However, the NonEditableComboToggleButtonStyle does not set background, and it therefore leads to a control that looks like the attached image.
This can be fixed by overriding the RadComboBox style, but it isn't simple to set the background on the ToggleButton, so you need to create custom templates and style to do it.
If the height of RadComboBox is set to a value smaller than 26px (in Office2013) then the content of the RadToggleButton presenting the selected content is clipped.
This was reproduced with the Office2013 theme.
To work this around set the MinHeight of the child RadToggleButton to the same MinHeight as RadComboBox.
private
void
RadComboBox_Loaded(
object
sender, RoutedEventArgs e)
{
var comboBox = (RadComboBox)sender;
var toggle = comboBox.FindChildByType<RadToggleButton>();
toggle.MinHeight = comboBox.MinHeight;
}
NullReferenceException appears when the multiple selection is enabled, items are selected and the Text property of the RadComboBox control becomes null.
To resolve this, you can override the OnTextChanged method of RadComboBox and replace the null value with an empty string.
public class CustomRadComboBox : RadComboBox
{
protected override void OnTextChanged(string oldValue, string newValue)
{
if (string.IsNullOrEmpty(newValue))
{
newValue = string.Empty;
Dispatcher.BeginInvoke(new Action(() =>
{
SelectedItems.Clear();
}));
}
base.OnTextChanged(oldValue, newValue);
}
}
The items of the RadComboBox control flicker when scrolling and the Windows 11 theme is applied.
To work this around, a new Style with TargetType="RadComboBoxItem" could be created for the ItemContainerStyle property of RadComboBox. Then, set the BorderBrush and ThemeHelper.MouseOverBrush properties to "#F9F9F9".
xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
<telerik:RadComboBox.ItemContainerStyle>
<Style TargetType="telerik:RadComboBoxItem">
<Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="#F9F9F9" />
<Setter Property="BorderBrush" Value="#F9F9F9"/>
</Style>
</telerik:RadComboBox.ItemContainerStyle>
Currently, the drop down of RadComboBox contains only the RadComboBoxItems and the Clear Selection button. Add new content presenter that allows you to include extra visuals, like buttons or text.
The feature is similar to the AdditionalContent of RadTabControl.
When "TextSearchMode" is set to "Contains", IsEditable="True" and IsReadOnly="True": it should be possible to select all or some of the text and by pressing delete or backspace the selected text should be removed.