Example #1
0
        /// <summary>
        /// Find the NodeItem UI element that is associated with 'node'.
        /// 'node' can be a view-model object, in which case the visual-tree
        /// is searched for the associated NodeItem.
        /// Otherwise 'node' can actually be a 'NodeItem' in which case it is
        /// simply returned.
        /// </summary>
        internal NodeItem FindAssociatedNodeItem(object node)
        {
            NodeItem nodeItem = node as NodeItem;

            if (nodeItem == null)
            {
                nodeItem = nodeItemsControl.FindAssociatedNodeItem(node);
            }
            return(nodeItem);
        }