Esempio n. 1
0
        public Style GetAppliedStyle()
        {
            Style      style = new Style();
            StyleGroup group = this.StyleGroup;

            while (group != null)
            {
                foreach (var entry in group.Style)
                {
                    if (!style.ContainsKey(entry.Key))
                    {
                        style.Add(entry.Key, entry.Value);
                    }
                }

                group = group.StyleGroup;
            }

            return(style);
        }
Esempio n. 2
0
        public bool BelongsToStyleGroup(StyleGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            StyleGroup parentGroup = this.StyleGroup;

            if (parentGroup == group)
            {
                return(true);
            }
            else if (parentGroup != null)
            {
                return(parentGroup.BelongsToStyleGroup(group));
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
 public StyleScope(StyleGroup group)
 {
     this.Group = group;
 }