我想获取放置在xaml中的控件的宽度和高度,我们将在OnSizeAllocated事件期间请求高度和宽度,是否有任何事件会在OnSizeAllocated之后触发?这样我可以获得控件的确切高度和宽度吗?
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
SelectedSideImage.WidthRequest = width - (width * 10 / 100);
SelectedSideImage.HeightRequest = height - (height * 50 / 100);
}