Fix CoreWindow template window resize logic