/// <summary> /// When we stylus down, we begin a new selection box /// </summary> /// <param name="sender"></param> Ignored :( /// <param name="e"></param> MouseEventArgs, contains mouse location protected override void InkCanvas_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { if (!e.Inverted) { BeginSelection(e.GetPosition(sketchPanel.InkCanvas)); } }
private void imageColorPicker_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { if (Source != null) { Point s = e.GetPosition(this); Point p = PointToScreen(s); if (!dc_present) { dc = GetDC(IntPtr.Zero); dc_present = true; } SelectedColor = GetPixelPointColor(p); SelectedPosition = s; RoutedEventArgs re = new RoutedEventArgs(SelectedColorChangedEvent); RaiseEvent(re); } }
/// <summary> /// When we stylus down, we begin a new selection box /// </summary> /// <param name="sender"></param> Ignored :( /// <param name="e"></param> MouseEventArgs, contains mouse location public override void InkCanvas_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { if (!subscribed || e.Inverted) { return; } // We don't want to do anything if we clicked inside of our bounding box... System.Windows.Rect selectBounds = new System.Windows.Rect(); selectBounds.Location = new System.Windows.Point(BoundingBox.X - 18, BoundingBox.Y - 18); selectBounds.Size = new System.Windows.Size(BoundingBox.Width + 36, BoundingBox.Height + 36); // Unless we are above a stroke System.Windows.Point point = e.GetPosition(sketchPanel.InkCanvas); Sketch.Substroke substrokeBelow = sketchPanel.InkSketch.Sketch.substrokeAtPoint(point.X, point.Y, SEARCH_RADIUS); if (substrokeBelow == null && selectBounds.Contains(point)) { selection = new StrokeCollection(); return; } else if (substrokeBelow != null) { selection = Selection; } else { selection = new StrokeCollection(); } // Set the editing mode to none (removes selections) sketchPanel.DisableDrawing(); // Begin new selection start = e.GetPosition(sketchPanel.InkCanvas); currentRect = new System.Windows.Rect(start.X, start.Y, 1.0, 1.0); selectionMade = false; makingSelection = true; DrawBox(); }
private void SearchLabel_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { SearchBox.Focus(); }
protected internal virtual new void OnStylusDown(System.Windows.Input.StylusDownEventArgs e) { }
private void Window_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { logger.InfoFormat("{0:D3}.{1}", ++numberIndex, MethodBase.GetCurrentMethod().Name); }
public virtual void InkCanvas_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { this.makingSelection = true; }
private void ParagraphFigureUserControl_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { ParagraphFigureUserControl_GotFocus(sender, e); }
private void TextboxInkcavasUserControl_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { textboxInkcavasUserControl_GotFocus(sender, e); }
protected virtual void InkCanvas_StylusDown(object sender, System.Windows.Input.StylusDownEventArgs e) { BeginSelection(e.GetPosition(sketchPanel.InkCanvas)); }