1
votes

It's a simple question:

How do I get the Width of a TextBlock?

The width of this TextBlock is set to Auto, in the XAML.

How do I get the Width of this TextBlock via code?

2

2 Answers

3
votes
3
votes

Just use the property

TextBlock.ActualWidth