Commit a9e66c2a authored by sschurig's avatar sschurig
Browse files

External CSS Option for SVGDocument

Added External Cascading Style Sheet Option to SVGDocument.
parent 1bc4c0f3
......@@ -64,6 +64,11 @@ namespace Svg
/// </summary>
public int Ppi { get; set; }
/// <summary>
/// Gets or sets an external Cascading Style Sheet (CSS)
/// </summary>
public string ExternalCSSHref { get; set; }
#region ITypeDescriptorContext Members
IContainer ITypeDescriptorContext.Container
......@@ -471,6 +476,9 @@ namespace Svg
xmlWriter.WriteDocType("svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd", null);
if (!String.IsNullOrEmpty(this.ExternalCSSHref))
xmlWriter.WriteProcessingInstruction("xml-stylesheet", String.Format("type=\"text/css\" href=\"{0}\"", this.ExternalCSSHref));
this.WriteElement(xmlWriter);
xmlWriter.Flush();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment