Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To remove the white background from Telerik Wpf RadMultiColumnComboBox when it is IsKeyboardFocusWithin, you can modify its control template by removing the Background property of the PART_EditableTextBox element. Here's an example of how to do it:

  1. Define a new style for the RadMultiColumnComboBox control:
<Style TargetType="telerik:RadMultiColumnComboBox">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:RadMultiColumnComboBox">
                <Grid x:Name="TemplateRoot">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <telerik:RadDropDownButton x:Name="PART_Button" />
                    <TextBox x:Name="PART_EditableTextBox" Grid.Row="1" />
                    <Popup x:Name="PART_Popup" />
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
  1. Modify the control template by removing the Background property of the PART_EditableTextBox element:
<ControlTemplate TargetType="telerik:RadMultiColumnComboBox">
    <Grid x:Name="TemplateRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <telerik:RadDropDownButton x:Name="PART_Button" />
        <TextBox x:Name="PART_EditableTextBox" Grid.Row="1"
                 Background="{TemplateBinding Background}"
                 BorderBrush="{TemplateBinding BorderBrush}"
                 BorderThickness="{TemplateBinding BorderThickness}"
                 FocusVisualStyle="{x:Null}" />
        <Popup x:Name="PART_Popup" />
    </Grid>
    <ControlTemplate.Triggers>
        <Trigger Property="IsKeyboardFocusWithin" Value="True">
            <Setter TargetName="PART_EditableTextBox" Property="Background" Value="Transparent" />
        </Trigger>
    </ControlTemplate.Triggers>
</ControlTemplate>
  1. Set the new style for the RadMultiColumnComboBox control:
<telerik:RadMultiColumnComboBox Style="{StaticResource MyRadMultiColumnComboBoxStyle}" />