private void ToggleDetailControlAnimation() { var currentPos = _clickedContainer.TransformToVisual(ListControl).TransformPoint(new Point(0, 0)); var targetPos = GetTargetPosition(); var targetRatio = GetTargetSize().X / _clickedContainer.ActualWidth; var targetOffsetX = targetPos.X - currentPos.X; var targetOffsetY = targetPos.Y - currentPos.Y; if (_titleStackVisual.Offset.Y == 0) { _restoreTitleStackStatus = true; } ToggleTitleStackAnimation(false); ToggleRefreshBtnAnimation(false); ListControl.MoveItemAnimation(new Vector3((float)targetOffsetX, (float)targetOffsetY, 0f), (float)targetRatio); DetailControl.CurrentImage = _clickedImg; DetailControl.ToggleDetailGridAnimation(true); NavigationService.AddOperation(() => { DetailControl.HideDetailControl(); return(true); }); }
private void ToggleDetailControlAnimation() { DetailControl.CurrentImage = _clickedImg; DetailControl.Show(_clickedContainer); NavigationService.AddOperation(() => { DetailControl.Hide(); return(true); }); }
private void ToggleDetailControlAnimation() { DetailControl.CurrentImage = _clickedImg; DetailControl.Show(_clickedContainer); var key = (string)App.Current.Resources["GestureKey"]; if (!LocalSettingHelper.HasValue(key)) { ToggleGestureTipsControlAnimation(true, 500); } NavigationService.AddOperation(() => { DetailControl.Hide(); return(true); }); }
private void TouchGrid_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e) { if (e.Cumulative.Translation.X >= 70) { if (!DrawerOpended) { DrawerOpended = true; } else { ToggleDrawerAnimation(true); ToggleDrawerMaskAnimation(true); } NavigationService.AddOperation(() => { if (MainVM.DrawerOpened) { MainVM.DrawerOpened = false; return(true); } return(false); }); } else { if (DrawerOpended) { DrawerOpended = false; } else { ToggleDrawerAnimation(false); ToggleDrawerMaskAnimation(false); } } }
private void ToggleDetailControlAnimation() { var position = DetailControl.GetTargetPosition(); var titleRect = TitleStack.TransformToVisual(Window.Current.Content) .TransformBounds(new Rect(0, 0, TitleStack.ActualWidth, TitleStack.ActualHeight)); var clickedItemRect = _clickedContainer.TransformToVisual(Window.Current.Content) .TransformBounds(new Rect(0, 0, _clickedContainer.ActualWidth, _clickedContainer.ActualHeight)); titleRect.Intersect(clickedItemRect); if (!titleRect.IsEmpty) { _restoreTitleStackStatus = true; ToggleTitleStackAnimation(false); } DetailControl.CurrentImage = _clickedImg; DetailControl.Show(_clickedContainer); NavigationService.AddOperation(() => { DetailControl.Hide(); return(true); }); }