private void MainContent_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { var owner = sender as FrameworkElement; bool isInArea = false; switch (this.DrawerLocation) { case DrawerLocation.Left: isInArea = e.Position.X < this.TouchTargetThreshold; break; case DrawerLocation.Right: isInArea = e.Position.X > owner.ActualWidth - this.TouchTargetThreshold; break; case DrawerLocation.Top: isInArea = e.Position.Y < this.TouchTargetThreshold; break; case DrawerLocation.Bottom: isInArea = e.Position.Y > owner.ActualHeight - this.TouchTargetThreshold; break; } if (isInArea) { this.DrawerState = Primitives.DrawerState.Moving; this.Context.MainContentStoryBoard.Begin(); this.Context.MainContentStoryBoard.Pause(); this.Context.DrawerStoryBoard.Begin(); this.Context.DrawerStoryBoard.Pause(); this.shouldAnimate = true; } }
private void HandlePlayerControlProgressBarBezzelManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { ProgressBarScrubView.Visibility = Visibility.Visible; BindingExpression bindingExpression = PlayerControlProgressBarCompleted.GetBindingExpression(Rectangle.WidthProperty); savedWidthBinding = bindingExpression.ParentBinding; }
private void tab_Keyboard_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { try { TouchStartingPoint = e.Position; } catch { } }
protected override void OnManipulationStarted(ManipulationStartedRoutedEventArgs e) { base.OnManipulationStarted(e); if (Action != null) { Action.OnManipulationStarted(e); } }
private void Drawer_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { this.DrawerState = Primitives.DrawerState.Moving; this.shouldAnimate = true; this.Context.MainContentStoryBoardReverse.Begin(); this.Context.MainContentStoryBoardReverse.Pause(); this.Context.DrawerStoryBoardReverse.Begin(); this.Context.DrawerStoryBoardReverse.Pause(); }
private void ImageOnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { var image = (Image)sender; image.Opacity = 0.4; var transform = (CompositeTransform)image.RenderTransform; startTranslation = new Point(transform.TranslateX, transform.TranslateY); startRotation = transform.Rotation; startScale = transform.ScaleX; }
private void _contentGrid_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { if (e.PointerDeviceType != PointerDeviceType.Touch) { return; } if (manipulationStatus == ManipulationStatus.None) { if (PivotItem != null && FrozenColumns > 0) { var pt = e.Position; pt = this.TransformToVisual(_columnHeaderPanel).TransformPoint(pt); var fx = _columnHeaderPanel.Columns.GetFrozenSize(); // adjust for scroll position var sp = _columnHeaderPanel.ScrollPosition; if (pt.X < 0 || pt.X > fx) pt.X -= sp.X; var column = _columnHeaderPanel.Columns.GetItemAt(pt.X); if (FrozenColumns > column) { startingCrossSlideLeft = startingCrossSlideRight = true; } } if (_header != null) { var pt = e.Position; pt = this.TransformToVisual(_header).TransformPoint(pt); var rect = new Rect(0, 0, _header.ActualWidth, _header.ActualHeight); if (rect.Contains(pt)) { if (PivotItem != null) { startingCrossSlideLeft = startingCrossSlideRight = true; } manipulationOnHeaderOrFooter = true; } } if (_footer != null) { var pt = e.Position; pt = this.TransformToVisual(_footer).TransformPoint(pt); var rect = new Rect(0, 0, _footer.ActualWidth, _footer.ActualHeight); if (rect.Contains(pt)) { if (PivotItem != null) { startingCrossSlideLeft = startingCrossSlideRight = true; } manipulationOnHeaderOrFooter = true; } } } }
void TouchArea_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { // reset the animation // todo: wonder if there should be a method to remove a certain key frame? // so I'd only need to remove the keyframe (_animation.InsertKeyFrame(1.0f, new Vector3());) // rather than create a new animation instance _x = 0.0f; _animation = _compositor.CreateVector3KeyFrameAnimation(); _animation.InsertExpressionKeyFrame(0.0f, "touch.Offset"); _animation.SetReferenceParameter("touch", _touchAreaVisual); }
protected void OnDialerDragStart(object sender, ManipulationStartedRoutedEventArgs e) { DialerTransform.CenterX = Width / 2; DialerTransform.CenterY = Height / 2; startAngle = DialerTransform.Angle; if (DragBegin != null) { DragBegin(this, null); } }
void MonitorManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { _xOffsetStartValue = e.Position.X; _yOffsetStartValue = e.Position.Y; if (Movement != null) Movement(this, new MovementMonitorEventArgs { X = _xOffsetStartValue, Y = _yOffsetStartValue }); e.Handled = true; }
async void ManipulateMe_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { try { Point point = new Point( e.Position.X, e.Position.Y); TransformGroup group = new TransformGroup(); TranslateTransform tempTranslateTransform = new TranslateTransform(); tempTranslateTransform.X = _transform.CenterX; tempTranslateTransform.Y = _transform.CenterY; RotateTransform tempRotateTransform = new RotateTransform(); tempRotateTransform.CenterX = _transform.CenterX; tempRotateTransform.CenterY = _transform.CenterY; tempRotateTransform.Angle = _transform.Rotation; group.Children.Add(tempTranslateTransform); group.Children.Add(tempRotateTransform); Point center = tempRotateTransform.TransformPoint(e.Position); Point localPoint = group.Inverse.TransformPoint(center); localPoint.X *= _transform.ScaleX; localPoint.Y *= _transform.ScaleY; Point worldPoint = group.TransformPoint(localPoint); Point distance = new Point( worldPoint.X - point.X, worldPoint.Y - point.Y); _transform.TranslateX += distance.X; _transform.TranslateY += distance.Y; _transform.CenterX = point.X; _transform.CenterY = point.Y; } catch (Exception ex) { } }
private void OnManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { PinchProcessor.Instance.AddListener(this); this.mouseCaptureReleased = false; this.manipulating = true; this.isInHold = false; this.manipulationContainer = e.Container; this.originalSource = e.OriginalSource; this.primaryTouchPoint = this.manipulationContainer.TransformToVisual(this.owner).TransformPoint(e.Position); Frame frame = Window.Current.Content as Frame; if (frame != null) { //this.currentOrientation = frame.Orientation; this.currentOrientation = ApplicationView.Value; } if (this.NotifyGestureStart != null) { this.NotifyGestureStart(); } }
private void Slider_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { _seeking = true; BackgroundMediaPlayer.Current.Pause(); }
private static AnimeGridItem _manip; //currently manipulated item private void AnimeGridItem_OnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { if (_manip != null) return; _initialPoint = e.Position; _manip = this; DecrementField.Visibility = IncrementField.Visibility = Visibility.Visible; }
private void RefreshLoadPanel_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { TouchBegin(e.Position.Y); Debug.WriteLine("### Started"); }
private void ManipulationStackPanel_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { }
private void clippingPanel_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { prePositon = e.Position; if (prePositon.X <= 5 && prePositon.Y <= 5) { positon = POSITIONS.LEFTTOP; } else if (prePositon.X >= ((sender as RelativePanel).ActualWidth - 5) && prePositon.Y <= 5) { positon = POSITIONS.RIGHTTOP; } else if (prePositon.X <= 5 && prePositon.Y >= ((sender as RelativePanel).ActualHeight - 5)) { positon = POSITIONS.LEFTBUTTOM; } else if (prePositon.X >= ((sender as RelativePanel).ActualWidth - 5) && prePositon.Y >= ((sender as RelativePanel).ActualHeight - 5)) { positon = POSITIONS.RIGHTBUTTOM; } else { positon = POSITIONS.UNKNOWN; } }
private void DrawCanvas_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { this.points = new List<Windows.Foundation.Point>(); this.anchorPoint = e.Position; this.points.Add( new Windows.Foundation.Point( e.Position.X / DrawCanvas.ActualWidth, e.Position.Y / DrawCanvas.ActualHeight)); }
private void StartSwipe(object sender, ManipulationStartedRoutedEventArgs e) { startPosition = e.Position.X; verticalStartPosition = e.Position.Y; }
private void OnAdornManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { _glass.Background = new SolidColorBrush(Colors.Transparent); _cancelManipulation = false; }
void LOReaderView_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { }
private void OnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { _isAllowedToDragVertically = true; _isAllowedToDragHorizontally = true; _isDragging = false; }
private void grid_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { _timer?.Stop(); }
private void Sidebar_OnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { }
private void HypothesesView_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { _scrollStartLastIndex = _lastVisibleIndex; _currentCumulativeDelta = 0; }
/// <summary> /// Called before the ManipulationStarted event occurs. /// </summary> /// <param name="e">Event data for the event.</param> /// <remarks> /// This is used for touch scrolling. /// </remarks> protected override void OnManipulationStarted(ManipulationStartedRoutedEventArgs e) { this.scroller = 0d; e.Handled = true; base.OnManipulationStarted(e); }
void OnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { _panAreaTransform = PanArea.RenderTransform as CompositeTransform; _paneRootTransform = PaneRoot.RenderTransform as CompositeTransform; if (_panAreaTransform == null || _paneRootTransform == null) { throw new ArgumentException("Make sure you have copied the default style to Generic.xaml!!"); } }
private void OnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { manipulationDistance = 0.0; isManipulationActive = true; }
private void Control_ManipulationStarted(object sender, Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e) { Process(e.Position.X, e.Position.Y); }
private void Grid_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { }
/// <summary> /// Called before the ManipulationStarted event occurs. /// </summary> /// <param name="e">Event data for the event.</param> protected override void OnManipulationStarted(ManipulationStartedRoutedEventArgs e) { base.OnManipulationStarted(e); if (e.Handled) { return; } if (e.PointerDeviceType == PointerDeviceType.Touch) { this.Focus(FocusState.Pointer); e.Handled = this.ActualController.HandleTouchStarted(this, e.ToTouchEventArgs(this)); } }
void Overlay_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { // reset the inital with of the Rect _x = (float)this.ImagePanel2.ActualWidth; }
/// <summary> /// Called before the ManipulationStarted event occurs. /// </summary> /// <param name="e"> /// Event data for the event. /// </param> protected override void OnManipulationStarted(ManipulationStartedRoutedEventArgs e) { base.OnManipulationStarted(e); this.touchPan = new PanManipulator(this); this.touchPan.Started(new ManipulationEventArgs(e.Position.ToScreenPoint())); this.touchZoom = new ZoomManipulator(this); this.touchZoom.Started(new ManipulationEventArgs(e.Position.ToScreenPoint())); this.touchDownPoint = e.Position; e.Handled = true; }
public void SetInitialPosition(object sender, ManipulationStartedRoutedEventArgs e) { _initialPoint = e.Position; }
private void ManipStarted(object sender, ManipulationStartedRoutedEventArgs e) { _initialPoint = e.Position; _manipulating = true; }
void Manipulation_Started(object sender, ManipulationStartedRoutedEventArgs e) { startX = e.Position.X; e.Handled = true; }
/// <summary> /// Called when the user presses down on the transparent drag-interceptor. Identifies the targed /// drag handle and list item and prepares for a drag operation. /// </summary> private void dragInterceptor_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) { if (this.dragItem != null) { return; } // Access the Panel containing all of the draggable ReorderListBoxItems if (this.itemsPanel == null) { ItemsPresenter scrollItemsPresenter = (ItemsPresenter)this.scrollViewer.Content; this.itemsPanel = Utilities.FindChild<StackPanel>(Window.Current.Content, ItemsPanelPart); //this.itemsPanel = (Panel)VisualTreeHelper.GetChild(scrollItemsPresenter, 0); } // Figure out the Point where the user put their finger down GeneralTransform interceptorTransform = this.dragInterceptor.TransformToVisual(Window.Current.Content); // TODO: replace this line - // Point targetPoint = interceptorTransform.Transform(e.ManipulationOrigin); Point targetPoint = interceptorTransform.TransformPoint(e.Position); targetPoint = ReorderListBox.GetHostCoordinates(targetPoint); // Get reference to all items at the Point where the finger is down List<UIElement> targetElements = VisualTreeHelper.FindElementsInHostCoordinates( targetPoint, this.itemsPanel).ToList(); // Get the first eligible ReorderListBoxItem ReorderListBoxItem targetItemContainer = targetElements.OfType<ReorderListBoxItem>().FirstOrDefault(); if (targetItemContainer != null && targetElements.Contains(targetItemContainer.DragHandle)) { // Transition to the VisualState for dragging (default is light grey underlay with lower opacity) VisualStateManager.GoToState(targetItemContainer, ReorderListBoxItem.DraggingState, true); // Position and resize the proxy image "dragIndicator" GeneralTransform targetItemTransform = targetItemContainer.TransformToVisual(this.dragInterceptor); Point targetItemOrigin = targetItemTransform.TransformPoint(new Point(0, 0)); Canvas.SetLeft(this.dragIndicator, targetItemOrigin.X); Canvas.SetTop(this.dragIndicator, targetItemOrigin.Y); this.dragIndicator.Width = targetItemContainer.RenderSize.Width; this.dragIndicator.Height = targetItemContainer.RenderSize.Height; // Store references to the object being dragged this.dragItemContainer = targetItemContainer; this.dragItem = this.dragItemContainer.Content; this.isDragItemSelected = this.dragItemContainer.IsSelected; this.dragInterceptorRect = interceptorTransform.TransformBounds( new Rect(new Point(0, 0), this.dragInterceptor.RenderSize)); this.dropTargetIndex = -1; } }
private void StartedImageManipulation(object sender, ManipulationStartedRoutedEventArgs e) { Point point = e.Position; _listBox.Items.Add("start (" + point.X + "," + point.Y + ")"); }
protected override void OnManipulationStarted(ManipulationStartedRoutedEventArgs e) { base.OnManipulationStarted(e); e.Handled = true; }