Exemplo 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);
        }
Exemplo 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);
            }
        }
Exemplo n.º 3
0
 public StyleScope(StyleGroup group)
 {
     this.Group = group;
 }