I want to round the corners on a RadComboBox, but I don't want to go through and edit the template for it. Is there way to do that without going through the hassle of doing that? Potentially just using a setter property or something to do it on the xaml side?
thanks.
3 Answers, 1 is accepted
0
Accepted
Nasko
Telerik team
answered on 05 Mar 2015, 03:00 PM
Hi Brett,
In order to achieve the desired appearance you could set the CornerRadius property of the ButtonChrome situated inside the NonEditableComboBox Template to the desired value. In code behind you could do that by hooking to the Loaded event with the following implementation:
var buttonChrome = radComboBox.Template.FindName("ButtonChrome",radComboBox) as ButtonChrome;
buttonChrome.CornerRadius = new CornerRadius(10, 10, 10, 10);
}
Hopes this helps.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
You could create an attached property for setting the desired CornderRadius in order to extend the functionality of RadComboBox - thus you would be able to move that setting of the CornerRadius in Xaml code.
We have created a sample project that demonstrates that approach - please, check it.
We hope this will help you.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.