private void image1_PointerPressed(object sender, PointerRoutedEventArgs e) { if (!Desk.Children.Contains(currentProject)) { Desk.Children.Add(currentProject); } ActionActive.Active(currentProject); }
void mv_PointerPressed(object sender, PointerRoutedEventArgs e) { FrameworkElement item = sender as FrameworkElement; IsMove = true; isMouseCaptured = true; ActionActive.Active(designCanvas.getCanvas()); mouseVerticalPosition = e.GetCurrentPoint(designCanvas.getCanvas()).Position.Y; mouseHorizontalPosition = e.GetCurrentPoint(designCanvas.getCanvas()).Position.X; }
public static void ActiveUserControl(FrameworkElement u) { ActionActive.Active(u); //int max = 0; //Panel p=getDesktopPanel(); //foreach (FrameworkElement f in p.Children) //{ // if (Canvas.GetZIndex(f) > max) // { // max = Canvas.GetZIndex(f); // } //} //Canvas.SetZIndex(u, max++); }