Why are ActualWidth and ActualHeight 0.0 in this case?

ActualHeight and ActualWidth are not set until the control is measured and arranged. Usually there is nothing in InitializeComponent() that causes a measure, so when it returns these will still be zero. You can force these to be computed earlier by simply calling the window’s Measure() and Arrange() methods manually after the window’s InitializeComponent() returns. … Read more