1、实现TreeView所有节点的展开和收缩
/// <summary>
////// </summary>
/// <param name="control">TreeView控件</param>
/// <param name="expandNode">true:展开 false:收缩</param>
private void SetNodeExpandedState(ItemsControl control, bool expandNode)
{
try
{
if (control != null)
{
foreach (object item in control.Items)
{
&n