private async void IsDetailPageVisiblePropertyChanged(bool oldValue, bool newValue) { if (!oldValue && newValue) { while (ViewIsBusy) { await Task.Delay(20); } // animate in #pragma warning disable 4014 DetailView.TranslateTo(0, 0, easing: Easing.CubicInOut); MasterView.TranslateTo(-MasterView.Width, 0, easing: Easing.CubicInOut); #pragma warning restore 4014 } else if (oldValue && !newValue) { while (ViewIsBusy) { await Task.Delay(20); } // animate out #pragma warning disable 4014 DetailView.TranslateTo(MasterView.Width, 0, easing: Easing.CubicInOut); MasterView.TranslateTo(0, 0, easing: Easing.CubicInOut); #pragma warning restore 4014 } }