Mixin and Control Font

Answered
0
0

I have applied a Mixin to override the theme font for all four categories default , default bold, menu, window-title.

When I run the app the Mixin gets applied and the correct fonts are used except for the report viewer control toolbars.

However if I add a line object t = Control.font and inspect its value it is Microsoft Sans Serif. (last in the list in the Theme)

So does the Control.Font command bypass the Mixin font exchange?

Thanks

Ewan

  • You must to post comments
Best Answer
0
0

The Font property of a Wisej control is either the value assigned to the control or the inherited font from a parent, or ultimately the font from the theme. However, the System.Drawing.Font object has no knowledge of web fonts, that’s why Wisej creates the theme fonts using the theme name prefixed by “@”. The serializer recognizes the theme font using the OriginalFontName property of the font object. The client will resolve the name to a valid web font. When you use the font on the server side you will see the fallback font used by the windows server and the theme name in OriginalFontName.

The report virewer is an ASP.NET control running in an iframe. To change its font you need to set the name and size in OnInit or OnLoad:

viewer.Font.Name = “Verdana”;
viewer.Font.Size = 30;

HTH

 

 

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.