Commit b667a15a authored by tebjan's avatar tebjan
Browse files

svg element has content changed event

parent f541d280
...@@ -82,12 +82,12 @@ namespace Svg ...@@ -82,12 +82,12 @@ namespace Svg
var oldVal = _content; var oldVal = _content;
_content = value; _content = value;
if(_content != oldVal) if(_content != oldVal)
OnAttributeChanged(new AttributeEventArgs{ Attribute = "", Value = value }); OnContentChanged(new ContentEventArgs{ Content = value });
} }
else else
{ {
_content = value; _content = value;
OnAttributeChanged(new AttributeEventArgs{ Attribute = "", Value = value }); OnContentChanged(new ContentEventArgs{ Content = value });
} }
} }
} }
...@@ -731,6 +731,20 @@ namespace Svg ...@@ -731,6 +731,20 @@ namespace Svg
handler(this, args); handler(this, args);
} }
} }
/// <summary>
/// Fired when an Atrribute of this Element has changed
/// </summary>
public event EventHandler<ContentEventArgs> ContentChanged;
protected void OnContentChanged(ContentEventArgs args)
{
var handler = ContentChanged;
if(handler != null)
{
handler(this, args);
}
}
#region graphical EVENTS #region graphical EVENTS
...@@ -952,6 +966,14 @@ namespace Svg ...@@ -952,6 +966,14 @@ namespace Svg
public object Value; public object Value;
} }
/// <summary>
/// Content of this whas was set
/// </summary>
public class ContentEventArgs : SVGArg
{
public string Content;
}
/// <summary> /// <summary>
/// Describes the Attribute which was set /// Describes the Attribute which was set
/// </summary> /// </summary>
......
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