In WPF4, how can i calculate the 'Size'
of FormattedText
or GlyphRun
for a drawingvisual
.
I'm using drawingvisual in a canvas. When i change text size or text, changes occur but Actual Width and Height are same or don't get updated.
Using dc As DrawingContext = drawingvisual.RenderOpen
Dim ft As New FormattedText(...)
dc.DrawText(ft, New Point(0, 0))
dc.Close()
End Using