This is a migrated thread and some comments may be shown as answers.

Office 2013 Theme ComboBox

5 Answers 13 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Harish
Top achievements
Rank 1
Harish asked on 21 Jun 2019, 10:14 AM
I have seen[checked with the WPF Inspector] that the Radtogglebutton control inside the RadComboBox has a default MinHeight of 26 [Where as it should be 0] because of this all the comboBox controls are being truncated if their height is set to less than 26. The only way to fix this is by coding the entire control Template for ComboBox. Why can't this be fixed directly by the telerik team.

5 Answers, 1 is accepted

Sort by
0
Dinko
Telerik team
answered on 26 Jun 2019, 09:05 AM
Hello Harish,

Thank you for the provided image.

The MinHeight property of the RadToggleButton is set to 26 by design. I have checked this on my side and not sure if I was able to reproduce this truncation. I have set the Height of the RadComboBox to 12 and set the MinHeight of the control to 0. This way the RadToggleButton is not truncated. I think I am missing something here. May I ask you to share an image of the described behavior on your side. This way I can have a better look at this and provide you a prompt solution.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Harish
Top achievements
Rank 1
answered on 26 Jun 2019, 11:02 AM

Hi,

I have already checked if I was able to fix the issue by the parameters that you provided[RadComboBox Height to <26 and its MinHeight to 0 ]. But the truncation was seen, So I tried partially coding the control template for RadComboBox and then it worked Fine. I want to know if the issue can be fixed without control Template, as in Office_BlackTheme everything is working fine, but I need to apply Office2013Theme and I am facing this issue.

I have attached the screen captures of both the cases[with MinHeight and with partial Control Template]

Thanks,

Harish

0
Martin Ivanov
Telerik team
answered on 01 Jul 2019, 08:52 AM
Hello Harish,

You are right about the truncation. The following code reproduces it when the Office2013 theme is applied.
<telerik:RadComboBox Height="18" MinHeight="0">
    <telerik:RadComboBoxItem Content="Item 1" />
</telerik:RadComboBox>

To resolve this, you can use the FindChildByType<T>() extension method and manually set the height of the toggle button when the RadComboBox control gets loaded. For example:
private void RadComboBox_Loaded(object sender, RoutedEventArgs e)
{
    var comboBox = (RadComboBox)sender;
    var toggle = comboBox.FindChildByType<RadToggleButton>();
    toggle.MinHeight = comboBox.MinHeight;
}

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Harish
Top achievements
Rank 1
answered on 01 Jul 2019, 10:49 AM

Hi,

Thanks for the solution you provided but it is not feasible for the application that I am working on. It would have been nice if telerik controls had consistency from theme to theme in terms of implementation. I think now coding the entire control template is the only only option. So,do you have any idea of where can I find the default template of the RadComboBox, I mean I have to just change the height of toggle button and rest of all are same.

Thanks,
Harish

0
Martin Ivanov
Telerik team
answered on 03 Jul 2019, 12:00 PM
Hello Harish,

I logged an item in our feedback portal to improve the MinHeight issue. You can follow it in the UI for WPF feedback portal. I also updated your Telerik points.

About the templates, you can see how to get the default templates of the Telerik controls in the Editing Control Template articles.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ComboBox
Asked by
Harish
Top achievements
Rank 1
Answers by
Dinko
Telerik team
Harish
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or