User Interface Process Application Block – Version 2.0

The User Interface Process Application Block provides a simple yet extensible framework for developing user interface processes. It is designed to abstract the control flow and state management out of the user interface layer into a user interface process layer. This helps you write generic code for the control flow and state management for different … Continue reading User Interface Process Application Block – Version 2.0

Determining the Width of Text

It’s not as hard as you might think in .NET. In the code below, just send the text and the Font object that, for example, the TextBox is using.public static int GetTextWidth(string dataText, Font dataFont){ return Graphics.FromImage(new Bitmap(1,1)).MeasureString(dataText, dataFont).ToSize().Width;} Tip Submitted By: David McCarter