Managed Control Adds Capabilities to Windows Forms Development
- By John K. Waters
- May 3, 2007
U.K.-based Gobicode Ltd. has released an HTML-rendering component designed to extend the capabilities of the .NET Framework.
HTMLLabel 1.0 is an add-on to Windows Forms designed to give forms developers access to a range of text and image formatting capabilities they haven't been able to use before, including super- and subscript, full text justification and in-line images.
HTMLLabel is a managed control that replaces the Windows Forms Label control. It parses the contents of the Text field, processes HTML tags (such as <font> and <img>) and adjusts content accordingly. Essentially, it allows developers to mark up text for Windows applications just as it's done in Web development. Also, the component can render to any graphics surface, which allows developers to extend their own controls with richly formatted content. Because it's C# managed code, there's no browser dependency.
Gobicode did not design the HTMLLabel control to function as a full Web browser, but rather to support a subset of HTML tags that allow developers to format text and images.
One noteworthy feature of this product is its pixel alignment capability. Gobicode says it can provide correct baseline alignment of HTML formatted text regardless of the combination of fonts, styles and sizes being rendered.
The 1.0 release, which shipped last month, adds a feature not seen in the beta version released in January: multi-color gradient fills for the control's background and text. The final version combines fonts of different types and styles, then lets the HTMLLabel handle alignment and baseline calculations.
Developer Warwick Stock founded Gobicode a year ago out of frustration at not being able to render super -- and subscripts in a scientific application he was working on. He now sees the product as a kind of stepping-stone to Windows Presentation Foundation, the next-generation presentation subsystem for the .NET Framework 3.0.
"It gives Windows Forms developers that level of flexibility," Stock says. "A lot of people may not grasp how important things like pixel alignment issues are, but some tools produce output with text misaligned by three pixels or more. That kind of incompatibility is brutal for Forms developers."
The product's installation package includes assemblies for .NET 1.1 and .NET 2.0. It can be integrated into Visual Studio 2003 and 2005, as well as other IDEs supporting the .NET Framework. The install pack also comes with a demo application with C# examples. A single developer license costs $96.50.
About the Author
John K. Waters is a freelance writer based in Silicon Valley. He can be reached
at [email protected].