Click here to Skip to main content
15,897,273 members
Articles / Desktop Programming / WPF

SharpVectors - SVG# Reloaded: An Introduction

Rate me:
Please Sign up or sign in to vote.
4.98/5 (33 votes)
17 Nov 2010BSD10 min read 206.2K   21.7K   101  
A C# library for converting SVG to WPF and viewing SVG files in WPF Applications
using System;
using System.Xml;

using SharpVectors.Dom.Css;

namespace SharpVectors.Dom.Svg
{
    public sealed class SvgExternalResourcesRequired
	{
		public SvgExternalResourcesRequired(SvgElement ownerElement)
		{
			this.ownerElement = ownerElement;

			this.ownerElement.attributeChangeHandler += new NodeChangeHandler(AttributeChange);
		}
		private SvgElement ownerElement;


		private void AttributeChange(Object src, XmlNodeChangedEventArgs args)
		{
			XmlAttribute attribute = src as XmlAttribute;

			if(attribute.LocalName == "externalResourcesRequired")
			{
				externalResourcesRequired = null;
			}
		}

		private ISvgAnimatedBoolean externalResourcesRequired;
		public ISvgAnimatedBoolean ExternalResourcesRequired
		{
			get
			{
				if(externalResourcesRequired == null)
				{
					externalResourcesRequired = new SvgAnimatedBoolean(ownerElement.GetAttribute("externalResourcesRequired"), false);
				}
				return externalResourcesRequired;
			}
		}
	
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License


Written By
Engineer
Japan Japan
Systems Engineer

Comments and Discussions