Hide the Drop-Down Button of of RadMultiColumnComboBox
Environment
Product Version | 2024.1.312 |
Product | RadMultiColumnComboBox for WPF |
Description
How to hide the drop-down button of the RadMultiColumnComboBox
control.
Solution
Subscribe to the Loaded
event of RadMultiColumnComboBox and utilize the ChildrenOfType method to retrive the RadDropDownButton
element with x:Name="PART_DropDownButton". Then, set its Visibility
property to Visibility.Collapsed
.
Retrieve the RadDropDownButton element on the Loaded event of RadMultiColumnComboBox
private void RadMultiColumnComboBox_Loaded(object sender, RoutedEventArgs e)
{
var mccb = (RadMultiColumnComboBox)sender;
var dropDownButton = mccb.ChildrenOfType<RadDropDownButton>().FirstOrDefault(x => x.Name == "PART_DropDownButton");
if (dropDownButton != null)
{
dropDownButton.Visibility = Visibility.Collapsed;
}
}