Silverlight中Treeview中判断当前节点是否含有父节点

public bool isPareNull(TreeViewItem CurrItem)
{
  bool boolPareNote = false;
  try
  {
    if (CurrItem.Parent != null)
    boolPareNote = true;
  }
  catch (Exception)
  {
    throw;
  }
  return boolPareNote;
}

posted @ 2012-06-26 11:07  要等闲阿  阅读(289)  评论(0编辑  收藏  举报