protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect) { Window window = Window.ActiveWindow; window.SetTool(new ThreadTool()); }