private void MouseDown(object sender, MouseEventArgs e) { UndoService.BeginTransaction("Effect mouse down event."); if (e.Button == MouseButtons.Left) { _lastPoint.X = Cursor.Position.X; _lastPoint.Y = Cursor.Position.Y; } UndoService.AddAction(new EffectMouseEventAction(_layerCtrl)); }