示例#1
0
        private void OnAttributeChange(object src, XmlNodeChangedEventArgs args)
        {
            XmlAttribute attribute = src as XmlAttribute;

            if (attribute.NamespaceURI == SvgDocument.XLinkNamespace &&
                attribute.LocalName == "href")
            {
                _href        = null;
                _absoluteUri = null;
            }
        }
示例#2
0
        private void OnAttributeChange(object src, XmlNodeChangedEventArgs args)
        {
            XmlAttribute attribute = src as XmlAttribute;

            // Since SVG 2, the xlink:href attribute is deprecated in favor of simply href.
            // We are supporting both options
            if (attribute.NamespaceURI == SvgDocument.XLinkNamespace &&
                string.Equals(attribute.LocalName, "href", StringComparison.Ordinal))
            {
                _href        = null;
                _absoluteUri = null;
            }
            else if (string.Equals(attribute.LocalName, "href", StringComparison.Ordinal))
            {
                _href        = null;
                _absoluteUri = null;
            }
        }
        public override void HandleAttributeChange(XmlAttribute attribute)
        {
            if (attribute.NamespaceURI.Length == 0)
            {
                string localName = attribute.LocalName;
                if (_presentationAttributes.ContainsKey(localName))
                {
                    _presentationAttributes.Remove(localName);
                }

                switch (attribute.LocalName)
                {
                case "class":
                    _className = null;
                    // class changes need to propagate to children and invalidate CSS
                    break;
                }
            }
            base.HandleAttributeChange(attribute);
        }
        private void AttributeChange(Object src, XmlNodeChangedEventArgs args)
        {
            XmlAttribute attribute = src as XmlAttribute;

            if (attribute.NamespaceURI == SvgDocument.XLinkNamespace &&
                attribute.LocalName == "href")
            {
                href = null;
                absoluteUri = null;
            }
        }
        public override void HandleAttributeChange(XmlAttribute attribute)
        {
            if (attribute.NamespaceURI.Length == 0)
            {
                string localName = attribute.LocalName;
                if (presentationAttributes.ContainsKey(localName))
                {
                    presentationAttributes.Remove(localName);
                }

                switch (attribute.LocalName)
                {
                    case "class":
                        className = null;
                        // class changes need to propagate to children and invalidate CSS
                        break;
                }
            }
            base.HandleAttributeChange(attribute);
        }