public override void HandleAttributeChange(XmlAttribute attribute)
{
if(attribute.NamespaceURI.Length == 0)
{
// This list may be too long to be useful...
switch(attribute.LocalName)
{
// Additional attributes
case "x":
case "y":
case "dx":
case "dy":
case "rotate":
case "textLength":
case "lengthAdjust":
// Text.attrib
case "writing-mode":
// TextContent.attrib
case "alignment-baseline":
case "baseline-shift":
case "direction":
case "dominant-baseline":
case "glyph-orientation-horizontal":
case "glyph-orientation-vertical":
case "kerning":
case "letter-spacing":
case "text-anchor":
case "text-decoration":
case "unicode-bidi":
case "word-spacing":
// Font.attrib
case "font-family":
case "font-size":
case "font-size-adjust":
case "font-stretch":
case "font-style":
case "font-variant":
case "font-weight":
// textPath
case "startOffset":
case "method":
case "spacing":
// Color.attrib, Paint.attrib
case "color":
case "fill":
case "fill-rule":
case "stroke":
case "stroke-dasharray":
case "stroke-dashoffset":
case "stroke-linecap":
case "stroke-linejoin":
case "stroke-miterlimit":
case "stroke-width":
// Opacity.attrib
case "opacity":
case "stroke-opacity":
case "fill-opacity":
// Graphics.attrib
case "display":
case "image-rendering":
case "shape-rendering":
case "text-rendering":
case "visibility":
Invalidate();
return;
case "transform":
Invalidate();
break;
}
base.HandleAttributeChange(attribute);
}
else if (attribute.Name == "xml:preserve" || attribute.Name == "xlink:href")
{
// xml:preserve and xlink:href changes may affect the actual text content
Invalidate();
}
}