Microsoft.Silverlight.Testing.Controls.TreeViewItem.UpdateContainsSelection C# (CSharp) 메소드

UpdateContainsSelection() 개인적인 메소드

Update the ancestors of this item when it changes selection.
Unselection updates need to occur before selection updates because the old and new selected items may share a partial path.
private UpdateContainsSelection ( bool selected ) : void
selected bool /// A value indicating whether the item is selected. ///
리턴 void
        internal void UpdateContainsSelection(bool selected)
        {
            // Update the ContainsSelection flag from this item all the way up
            // through the tree.
            for (TreeViewItem item = ParentTreeViewItem; item != null; item = item.ParentTreeViewItem)
            {
                item.ContainsSelection = selected;
            }
        }