Silverlight/WPF: Retreiving the size of a `UIElement` once it has been rendered on screen
- by ondesertverge
I have the following simple piece of code:
var canvas = new Canvas();
foreach (var ztring in strings)
{
var textblock = new TextBlock();
textblock.Text = ztring;
panel.Children.Add(textblock);
textblock.Measure(infiniteSize);
…