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

RadControl.Font Override

1 Answer 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tyler
Top achievements
Rank 1
Tyler asked on 23 Feb 2017, 03:52 PM

here is the scenario..  

I am trying to create some wrapper classes for controls that display text such as labels, etc.  What I am seeing is that I am copy and pasting the same font override function for each control.  

 

Is there a recommended way of overriding the RadControl.Font and utilize that?  The problem, is the wrapper class can only have a single base class..  MyRadLabel : RadLabel

 

any pointers would be nice.  I hope I am just missing something small that I am not thinking of..

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Feb 2017, 08:15 AM
Hello Tyler,

Thank you for writing.  

Note that all controls in the Telerik UI for WinForms suite support theming mechanism where the style for each inner element in the control's elements structure is specified. Thus, the font can be specified for the element in the theme as well. There is not a unified way for applying the Font for all controls because of the diverse internal structure of the controls.

The possible solution that I can suggest is to the iterate the Form.Controls collection and set the Font property for each control. However, for more complex controls like RadGridView, the font is specified at the cell level and it is necessary to use the CellFormatting event.

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Tyler
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or