Beispiel #1
0
 public Style(Attributes Attributes, Element ParentElement)
 {
     this.Map = new Dictionary<string, string>();
     if (ParentElement != null)
         this.Map = new Dictionary<string,string>(ParentElement.Style.Map);
     if (Attributes.Map.ContainsKey("style"))
     {
         List<KeyValuePair<string, string>> StyleList = ParseStyle(Attributes.Map["style"]);
         foreach (KeyValuePair<string, string> StyleToken in StyleList)
         {
             if (Map.ContainsKey(StyleToken.Key))
                 Map[StyleToken.Key] = StyleToken.Value;
             else Map.Add(StyleToken.Key, StyleToken.Value);
         }
     }
 }
Beispiel #2
0
 public Element(List<CodeRenderer.MarkupStructure.TagAttribute> Attributes, Element ParentElement)
 {
     this.ParentElement = ParentElement;
     this.Attributes = new Attributes(Attributes, ParentElement);
     this.Style = new Style(this.Attributes, ParentElement);
 }