Ejemplo n.º 1
0
        public CSSStyleSheet DeleteRule(Int32 index)
        {
            if (index >= 0 && index < _cssRules.Length)
            {
                _cssRules.RemoveAt(index);
            }

            return(this);
        }
Ejemplo n.º 2
0
        public CSSGroupingRule DeleteRule(Int32 index)
        {
            if (index >= 0 && index < _cssRules.Length)
            {
                _cssRules.RemoveAt(index);
            }

            return(this);
        }
        public CSSKeyframesRule DeleteRule(String key)
        {
            for (int i = 0; i < _cssRules.Length; i++)
            {
                if ((_cssRules[i] as CSSKeyframeRule).KeyText.Equals(key, StringComparison.OrdinalIgnoreCase))
                {
                    _cssRules.RemoveAt(i);
                    break;
                }
            }

            return(this);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Deletes a keyframe rule from the current CSSKeyframesRule.
        /// </summary>
        /// <param name="key">The index of the keyframe to be deleted, expressed as a string resolving as a number between 0 and 1.</param>
        public void Remove(String key)
        {
            var element = Find(key);

            if (element == null)
            {
                return;
            }

            for (int i = 0; i < _rules.Length; i++)
            {
                if (element == _rules[i])
                {
                    _rules.RemoveAt(i);
                    break;
                }
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Removes a style rule from the current style sheet object.
 /// </summary>
 /// <param name="index">The index representing the position to be removed.</param>
 /// <returns>The current stylesheet.</returns>
 public void RemoveAt(Int32 index)
 {
     _rules.RemoveAt(index);
 }