Live Chat Icon For mobile
Live Chat Icon

How to align the text on a bitmap

Platform: ASP.NET| Category: GDI+

VB.NET


...
Dim sFormat As New StringFormat()
sFormat.Alignment = StringAlignment.Far
...
g.DrawString('Syncfusion', New Font('Arial', 16, FontStyle.Italic), SystemBrushes.WindowText, New PointF(2, 2), sFormat)
......

C#


...
StringFormat sFormat = new StringFormat() ;
sFormat.Alignment = StringAlignment.Far;
...
g.DrawString('Syncfusion', new Font('Arial', 16, FontStyle.Italic), SystemBrushes.WindowText, new PointF(2, 2), sFormat) ;
......

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.