private void EditMode(object sender, MouseButtonEventArgs e) { RemoveActive(); activeSticker = (StickerImage)sender; activeSticker.StartEdit(); activeSticker.delete.MouseLeftButtonDown += RemoveSticker; }
public void AddSticker(StickerImage image) { image.MouseLeftButtonDown += EditMode; image.pH.MouseLeftButtonDown += PlusHeight; image.mH.MouseLeftButtonDown += MinusHeight; image.pW.MouseLeftButtonDown += PlusWidth; image.mW.MouseLeftButtonDown += MinusWidth; canvas.Children.Add(image.stickerCanvas); elems.Add(image); }
public void RemoveElement(StickerImage element) { AddToUndo(); canvas.Children.Remove(element); elems.Remove(element); }
private void CreateSticker(object sender, MouseButtonEventArgs e) { StickerImage stickerImage = new StickerImage((Image)sender, this.dc); dc.AddSticker(stickerImage); }