Within the constructor of Page, I try to query its components size.
public sealed partial class MainPage : Page
{
public MainPage()
{
// Get the canvas size.
double height = canvas.ActualHeight;
double width = canvas.ActualWidth;
}
}
All I get in 0 height and width. May I know what is the best place to query for components’ size?
1 Answer