how to calculate the textbock height and width in on load if i create textblock from code?
actualwidth, c#, windows-8, windows-runtime, winrt-xaml
Solution
Call Measure() then Arrange() and then `ActualWidth` and `ActualHeight` will be updated.
Problem
``` TextBlock tbl= new TextBlock(); tbl.text="Kishore"; double x=tbl.ActualHeight; double y=tbl.ActualWidth; ``` If i execute the code from the loaded event in Metro - winRT will return 0 for both. How can I get the `ActualWidth` in the `Loaded` or `SizeChanged` event?