void img_PointerPressed(object sender, PointerRoutedEventArgs e) { if (Target == null) { return; } Target.DisableMove(); if (TargetImage == null) { return; } //TargetImage.CaptureMouse(); sp = e.GetCurrentPoint(DrawSelectCanvas).Position;//这个点,只是相对显示图来说的 ComboBoxItem ci = comboBoxSelectType.SelectedItem as ComboBoxItem; if (ci.Tag.ToString() == "Path") { CreatePath(sp, getTargetColor()); } if (ci.Tag.ToString() == "Line") { CreateLine(sp, getTargetColor()); } if (ci.Tag.ToString() == "Area") { CreateRect(sp, getTargetColor()); } begin = true; }
void img_PointerPressed(object sender, PointerRoutedEventArgs e) { si = Target.getImage(); //double dx = Canvas.GetLeft(si)+Canvas.GetLeft(Target.SelectLayer); //double dy = Canvas.GetTop(si) + Canvas.GetTop(Target.SelectLayer); if (si.Source != null) { Target.DisableMove(); sp = e.GetCurrentPoint(si).Position; } }
public void setUnMove() { MoveButtonBack.Background = null; lcp.DisableMove(); }