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

Make controls inherit font from parent form or container

5 Answers 505 Views
FontDropDownList
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 18 Jul 2013, 07:47 AM
Hi,
In traditional WinForms all controls on a form inherit their Font property from it's parent form or container by default.
Apparently, this is not the case with Telerik WinForms. 

When there are many controls on a form, it becomes very uncomfortable. Especially when dealing with DropDownList controls.
Not only you have to set control's Font property to the font you desire (which only sets the font of the selected text),
you also have to handle the VisualListItemFormatting event and set args.VisualItem.Font programmatically to set the font of drop down items.

Am i missing something simple or is it just the way it is with Telerik?

Thanks ahead,
Uri

5 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 19 Jul 2013, 08:49 AM
Hi Uri,

Thank you for writing.

You are correct in your observation. Our controls behave in a different way when it comes to styling. They consist many elements, and every element can be styled separately, this allows for greater flexibility when it comes to design. Once the design is created we do not want to override the settings for the child elements.
Because of this I would recommend you to use our visual style builder to style your applications the way you want them to look like.

More information about the Telerik Presentation Framework can be found here: http://www.telerik.com/help/winforms/tpf-overview.html. Also, this is a nice article about the property precedence in TPF: http://www.telerik.com/help/winforms/tools-visual-style-builder-working-with-visual-style-builder-property-precedence-rules.html.

Hope that helps. Please do not hesitate to contact us, should you have further questions.

Regards,
Paul
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Alex
Top achievements
Rank 1
answered on 19 Jul 2013, 09:30 AM
Thank you Paul,
But i think you should consider making controls automatically inherit the Font (and maybe some other properties) from it's parent when its dropped onto a form in future releases. Its rarely ever useful to have different fonts on a single page (unless its a font editing page) or even in the same application.

By now i'll just set everything manually,
But thanks anyway
0
Paul
Telerik team
answered on 24 Jul 2013, 07:46 AM
Hello Uri,

Thank you for writing back.

You have a point here. We will consider the best way to combine both flexibility and usability.
Thanks again for the useful feedback.

Please let us know if we can be of further assistance.

Regards,
Paul
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Mike
Top achievements
Rank 1
answered on 21 Jul 2015, 04:18 PM
has there been any development on this, perhaps a theme/control setting that would allow us to set inheritance?
0
Hristo
Telerik team
answered on 24 Jul 2015, 08:38 AM
Hello Mike,

Thank you for writing.

Currently, there is no global setting to provide the behavior discussed in this thread.

Telerik controls are built on top of Telerik Presentation Framework incorporating complex hierarchies of RadElements organized in logical trees. No matter how complex a control may be, it can be fully customized by manipulating the elements which are building it. Additional information about TPF you can find in the following section of our documentation: Telerik Presentation Framework

The RootElement of a control inherits the Font property as well as many others, related to its visual appearance from the parent control. However, in order to allow customizations many of these settings are defined through themes. This breaks the inheritance with any of the parent RadElements and eventually the control's parent. Please note that some properties are inherited from their parents and some are not because they are defined through themes.

I hope this information is useful. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
FontDropDownList
Asked by
Alex
Top achievements
Rank 1
Answers by
Paul
Telerik team
Alex
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or