Beispiel #1
0
        /// <summary>
        /// Return the attribute from the first place it's defined among:
        /// * the node itself
        /// * the node's type (directly declared or inherited via ChildType)
        /// * the treeview
        /// </summary>
        /// <param name="strAtt">The name of the attribute to lookup.</param>
        /// <returns>The value of the attribute.</returns>
        public object FindNodeAttribute(String strAtt)
        {
            object obj = GetStateVar(strAtt);

            if (obj != null && !(obj is CssCollection && ((CssCollection)obj).CssText == String.Empty))
            {
                return(obj);
            }

            obj = GetNodeTypeAttribute(strAtt);
            if (obj != null && !(obj is CssCollection && ((CssCollection)obj).CssText == String.Empty))
            {
                return(obj);
            }

            return(ParentTreeView.GetStateVar(strAtt));
        }