private void SetActiveTool(ITool tool) { if (ActiveTool != tool) { if (tool.Name == "Paste" && !CanPaste()) return; if (ActiveTool != null) ActiveTool.IsActive = false; ActiveTool = tool; tool.IsActive = true; PreviewChange(); } }