Alex Rivera | Logout

Is there a fast way to draw text in WPF

Asked 2011-02-22T17:21:00.133
9

I need to display a lot of text in my WPF window.

I am using DrawingContext.DrawText but it is too slow.

I tried DrawingContext.DrawGlyph. The call itself is faster but if you count the glyph creation, it is about the same time.

Is there a way to speed things up even it means loosing text quality?

wpf
Edit
Report

1 Answer

2

Have you tried with TextBlock controls ? I put them on a Canvas, and for me it turned out to be faster than solutions involving FormattedText or DrawingContext.DrawGlyphRun().

answered 2011-02-25T14:58:32.573

Your Answer