Exemplo n.º 1
0
        private StyleProperty GetStyleProperty(string styleName, string val)
        {
            StyleProperty sp;

            if (styleName.ToLower().IndexOf("image") > 0 && val.Trim().ToLower().IndexOf("url") == 0)
            {
                // remove url() from val; internally we store only the real URL
                Regex rx = new Regex(@"url\s*\(\s*(.*)\s*\)");
                Match m;
                if ((m = rx.Match(val)).Success)
                {
                    sp = new StyleProperty(m.Groups[1].Value);
                }
                else
                {
                    sp = new StyleProperty(val);
                }
            }
            else
            {
                sp = new StyleProperty(val);
            }
            return(sp);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds a property to the collection.
 /// </summary>
 /// <param name="property">The name of the property.</param>
 /// <param name="o">The property value.</param>
 public void Add(string property, StyleProperty o)
 {
     baseTable.Add(property, o);
 }