private void refreshToolStripMenuItem_Click(object sender, EventArgs e) { Cursor oldCursor = this.Cursor; this.Cursor = Cursors.WaitCursor; if (toolStripComboBoxSpyAs.Text == "WPF") { rootControl.Refresh(); FillTree(); } else { TreeNode node = treeView.SelectedNode; if (node != null && node.Tag is UIControlBase) { UIControlBase control = node.Tag as UIControlBase; control.Refresh(); FillTreeRec(node, 2); } } this.Cursor = oldCursor; }