private async Task ChangeSheetPosition(BottomSheetPosition position) { switch (position) { case BottomSheetPosition.Closed: await Task.WhenAll( SheetBack.FadeTo(0, 300, Easing.CubicOut), PreviewSheet.TranslateTo(0, PreviewSheet.Height, 300, Easing.CubicOut) ); previewSheetY = 0; SheetBack.IsVisible = false; BottomSheetPanView.TranslationY = 0; PreviewSheet.TranslationY = 0; break; case BottomSheetPosition.FullOpen: await Task.WhenAll( SheetBack.FadeTo(0.7, 300, Easing.CubicOut), PreviewSheet.TranslateTo(0, 0, 300, Easing.CubicOut) ); previewSheetY = PreviewSheet.TranslationY; break; } }
private async void Button_Clicked(System.Object sender, System.EventArgs e) { SheetBack.IsVisible = true; await Task.Delay(50); await Task.WhenAll( SheetBack.FadeTo(0.7, 300, Easing.CubicOut), BottomSheetPanView.TranslateTo(0, -PreviewSheet.Height, 300, Easing.CubicOut) ); }