protected override void OnSizeAllocated(double width, double height) { base.OnSizeAllocated(width, height); if (!First) { ShadowSize = new ViewBounds { Width = width / 2 - 50, Height = height / 2 - 50 }; ShadowPosition = new ViewBounds { X = 0, Y = height }; // DialogShadow.BindingContext = ShadowPosition; // ImitationDialog.BindingContext = ShadowSize; // DialogShadow.LayoutTo(new Rectangle(0, height, width, height), 0); Shadow.LayoutTo(new Rectangle(0, height, width, height)); Shadow.Opacity = 0; ImitationDialog.LayoutTo(new Rectangle(width / 2 - 50, height, 100, 100)); ImitationDialog.Opacity = 0; System.Diagnostics.Debug.WriteLine("deg : " + height + ", "); var rc = CustomDialog.Bounds; rc.X = -1000; CustomDialog.LayoutTo(rc, 0); Dialog = new ImitationDialog { Shadow = Shadow, Dialog = CustomDialog, }; Opacity = 1; } }