private void Expandchk_Click(object sender, EventArgs e) { if (Expandchk.Checked) { Treeview.ExpandAll(); } else { Treeview.CollapseAll(); } }