views:

11

answers:

1

I want to create a property on my class of type System.Web.UI.WebControls.FontInfo. However System.web.UI.WebControls.FontInfo does not have a public constructor of any kind.

I'm not sure how to create an instance of System.Web.UI.WebControls.FontInfo. Expectedly, I'm getting an "Object reference null" error when trying to use the property without initialization.

A: 

Instantiating a System.Web.UI.WebControls.Style object and using the Font property on that object as your Font object seems to be the accepted solution to using FontInfo in a custom control.

Source: FontInfo property for ASP.Net components

SAGExSDX