public void ManipulationStarting(DrawingCanvas drawingCanvas, ManipulationStartingEventArgs e) { e.ManipulationContainer = drawingCanvas; e.Handled = true; System.Diagnostics.Debug.WriteLine("ManipulationStarting"); }
private void canvas_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { e.ManipulationContainer = this; e.Mode = ManipulationModes.Scale | ManipulationModes.Translate; e.Handled = true; }
protected override void OnManipulationStarting(ManipulationStartingEventArgs e) { if (_content == null) { return; } _manipulationStarted = true; e.ManipulationContainer = _content; base.OnManipulationStarting(e); switch (ZoomMode) { case ZoomMode.Enabled: e.Mode |= ManipulationModes.Scale; break; case ZoomMode.Disabled: e.Mode &= ~ManipulationModes.Scale; break; } e.Handled = true; }
protected override void OnManipulationStarting(ManipulationStartingEventArgs e) { e.ManipulationContainer = this; e.Handled = true; base.OnManipulationStarting(e); }
/// <summary>Overwrite panning and zoom implementation fo the scroll viewer.</summary> /// <param name="e"></param> protected override void OnManipulationStarting(ManipulationStartingEventArgs e) { e.ManipulationContainer = this; // set manipulation mopde e.Mode = ManipulationModes.None; switch (PanningMode) { case PanningMode.Both: case PanningMode.HorizontalFirst: case PanningMode.VerticalFirst: e.Mode |= ManipulationModes.Translate; break; case PanningMode.HorizontalOnly: e.Mode |= ManipulationModes.TranslateX; break; case PanningMode.VerticalOnly: e.Mode |= ManipulationModes.TranslateY; break; } if (IsZoomAllowed) { e.Mode |= ManipulationModes.Scale; } // begin touch transform matrix touchTransformMatrix = BeginContentTransform(); e.Handled = true; } // proc OnManipulationStarting
private void GestureButton_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { _manipulationTimer.Restart(); e.ManipulationContainer = this; e.Handled = true; e.Manipulators.ToArray(); }
/// <summary> /// Event /// </summary> /// <param name="sender">Sender of the ManipulationStarting event.</param> /// <param name="e">Event parameters.</param> private void mapView_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { // reset panned flag wasPanned = false; // store initial zoom on for follow up ManipulationDelta events. manipulationDeltaInitialZoom = mapView.CurrentZoom; }
private void image_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { // Set the container (used for coordinates.) e.ManipulationContainer = Canvas; // Choose what manipulations to allow. e.Mode = ManipulationModes.All; }
//Touch scaling code. To be dealt with later private void centerImageView_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { e.ManipulationContainer = this; e.Handled = true; }
protected override void OnManipulationStarting(ManipulationStartingEventArgs e) { e.Handled = true; e.ManipulationContainer = this; _deltaCount = 0; _isFlick = false; base.OnManipulationStarting(e); }
void child_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { //Manipulations should be relative to the parent element e.ManipulationContainer = layoutRoot; SelectMoveGroup(sender); e.Handled = true; }
override public void ManipulationStarting(object sender, ManipulationStartingEventArgs e) { TouchManip = true; SetMarkers(); // VdSegmentUtil.ShowMarkers(selMarker1, selMarker2); base.ManipulationStarting(sender, e); }
private void ManipulationStarting(object sender, ManipulationStartingEventArgs e) { e.ManipulationContainer = _scene; e.Handled = true; var underContact = (IVdShape)((FrameworkElement)sender).Tag; underContact.ManipulationStarting(sender, e); Console.WriteLine("Scene Mgr : ManipulationStarting"); }
protected override void OnManipulationStarting(ManipulationStartingEventArgs e) { if (_disableManipulationCount > 0) { return; } base.OnManipulationStarting(e); RaiseParent(e); }
private void Window_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { e.ManipulationContainer = this; e.Handled = true; var element = e.OriginalSource as FrameworkElement; Canvas.SetZIndex(element, maxZIndex++); }
private void MoonPdfPanel_OnManipulationStarting(object sender, ManipulationStartingEventArgs e) { e.Mode = ManipulationModes.Scale | ManipulationModes.Translate; zoomOnManipulatedStarted = this.innerPanel.CurrentZoom; horizontalOffsetOnManipulationStarted = this.innerPanel.ScrollViewer.HorizontalOffset; verticalOffsetOnManipulationStarted = this.innerPanel.ScrollViewer.VerticalOffset; e.Handled = true; }
void BeginManipulation(object sender, ManipulationStartingEventArgs args) { if (args.Mode.HasFlag(ManipulationModes.TranslateX)) { timer.IsEnabled = false; } else { args.Cancel(); } }
private void timelineBlock_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { // Handle pipette as normal click event. if (sequencer.IsPipetteActive) { return; } FrameworkElement control = (FrameworkElement)sender; FrameworkElement controlBlock = (FrameworkElement)VisualTreeHelper.GetChild(control, 0); BlockViewModel block = (control.DataContext as BlockViewModel); // Make sure the clicked block is always selected before dragging. if (!block.IsSelected) { var compositionMode = CompositionModeFromKeyboard(); if (compositionMode == CompositionMode.Subtractive) { compositionMode = CompositionMode.None; } sequencer.SelectBlock(block, compositionMode); } var localPos = e.Manipulators.First().GetPosition(controlBlock); BlockDragMode mode; if (localPos.X > controlBlock.ActualWidth - DRAG_START_END_PIXEL_WINDOW_TOUCH && localPos.X < controlBlock.ActualWidth + DRAG_START_END_PIXEL_WINDOW_TOUCH) { mode = BlockDragMode.End; } else if (localPos.X < DRAG_START_END_PIXEL_WINDOW_TOUCH) { mode = BlockDragMode.Start; } else { mode = BlockDragMode.Block; } // record initial information dragMode = mode; dragStart = e.Manipulators.First().GetPosition(timeline); // always relative to timeline dragNeedsToOvercomeThreshold = true; dragTrackBaseline = GetTrackIndexFromOffset(dragStart.Y); draggedBlocks = sequencer.SelectedBlocks.Select(b => new DraggedBlockData { block = b, initialDuration = b.Duration, initialStartTime = b.StartTime }).ToList(); e.Mode = ManipulationModes.Translate; e.Handled = true; // TODO [low] handling ManipulationStarting prevents double tap (to select similar) from working with touch, but not handling it stops firing ManipulationCompleted (because of PanningMode of the scroller) }
public override void ManipulationStarting(object sender, ManipulationStartingEventArgs e) { TouchManip = true; SetMarkers(); //ShowMarkers(); e.Handled = true; base.ManipulationStarting(sender, e); }
internal ManipulationStartingRoutedEventArgs(UIElement container, ManipulationStartingEventArgs args) : base(container) { Container = container; _args = args; // We should convert back the enum from the args.Settings, but its the same value of the container.ManipulationMode // so we use the easiest path! _mode = container.ManipulationMode; }
public void ManipulationStartingMothod(object sender, ManipulationStartingEventArgs e) { e.ManipulationContainer = mainViewport3D; //单点操作设置 e.IsSingleTouchEnabled = true; Point pc = new Point(mainViewport3D.ActualWidth / 2, mainViewport3D.ActualHeight / 2); //pc=mainViewport3D.TranslatePoint(pc,grdMain); e.Pivot = new ManipulationPivot(pc, 200); e.Handled = true; }
private void ManipulationStarting(object sender, ManipulationStartingEventArgs e) { FrameworkElement manipulationContainer = this.ParentElement; // If the parent relationship goes through a popup(e.g. ComboBox/ComboBoxItem), then we need to use the element itself as the manipulation container, otherwise we'll crash(Expression 105258). if (manipulationContainer == null || !manipulationContainer.IsAncestorOf(this.AssociatedObject)) { manipulationContainer = this.AssociatedObject; } e.ManipulationContainer = manipulationContainer; e.Mode = this.SupportedGestures; e.Handled = true; }
private void OnManipulationStarting(object sender, ManipulationStartingEventArgs e) { FrameworkElement associatedObject = AssociatedObject; FrameworkElement container = associatedObject.Parent; if (container == null) { container = associatedObject; } e.ManipulationContainer = container; e.Mode = SupportedGestures; e.Handled = true; }
//<SnippetManipulationPivot> void Window_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { // Set the ManipulationPivot so that the element rotates as it is // moved with one finger. FrameworkElement element = e.OriginalSource as FrameworkElement; ManipulationPivot pivot = new ManipulationPivot(); pivot.Center = new Point(element.ActualWidth / 2, element.ActualHeight / 2); pivot.Radius = 20; e.Pivot = pivot; e.ManipulationContainer = this; e.Handled = true; }
private void HandleManipulationStarting(object sender, ManipulationStartingEventArgs e) { sender.AsOption <UIElement>().Do( el => { e.ManipulationContainer = el; e.Mode = ManipulationModes.All; if (_gestureSurfaceTouchRegistry.ContainsKey(el)) { _gestureSurfaceTouchRegistry[el] = new Dictionary <int, int>(); } }); }
void source_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { //Debug.WriteLine("==================source_ManipulationStarting"); e.ManipulationContainer = this; e.Handled = true; e.Mode = ManipulationModes.All; if (NO_RESUME_MOUSE && this.ViewArea.PdfRenderer.EnableAnnot) { this.ViewArea.PdfRenderer.onManiDragBegin(); e.Handled = false; e.Mode = ManipulationModes.Translate; } }
protected override void OnManipulationStarting(ManipulationStartingEventArgs args) { args.ManipulationContainer = this; args.Mode = ManipulationModes.TranslateY; // Initialize all fields manipulationInProgress = true; manipulationDeltaInProgress = false; tapInertiaInProgess = false; inertiaToUnknownIndex = false; reverseInertiaChecked = false; inertiaDirection = 1; args.Handled = true; base.OnManipulationStarting(args); }
protected override void OnManipulationStarting(ManipulationStartingEventArgs args) { args.ManipulationContainer = this; args.Mode = currentMode; // Adjust Z-order //FrameworkElement element = args.Source as FrameworkElement; //Panel pnl = element.Parent as Panel; //for (int i = 0; i < pnl.Children.Count; i++) // Panel.SetZIndex(pnl.Children[i], // pnl.Children[i] == element ? pnl.Children.Count : i); args.Handled = true; base.OnManipulationStarting(args); }
void image_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { var uie = e.OriginalSource as UIElement; if (uie != null) { if (last != null) { Canvas.SetZIndex(last, 0); } Canvas.SetZIndex(uie, 2); last = uie; } e.ManipulationContainer = paizhaokuang; e.Handled = true; }
// Initiate touch dragging/pinching. private void child_ManipulationStarting(object sender, ManipulationStartingEventArgs e) { if (_manipulationState != ManipulationState.NONE) { return; } _manipulationState = ManipulationState.TOUCH; _thresholdExceeded = false; // Things would be easier if we made the child the container to use as reference // for all calculations, but changing the child transformations while manipulation // events are coming in (and are calculated based on outdated transformation values) // apparently leads to oscillations. e.ManipulationContainer = this; e.Mode = ManipulationModes.Scale | ManipulationModes.Translate; e.IsSingleTouchEnabled = true; e.Handled = true; }
void ManipulationStarting(object sender, ManipulationStartingEventArgs e) { e.Mode = Noesis.ManipulationModes.All; e.ManipulationContainer = (UIElement)_root.FindName("root"); e.Handled = true; }