Commit 5fba6855 authored by tebjan's avatar tebjan
Browse files

added element added event

parent 88f9e289
......@@ -303,6 +303,11 @@ namespace Svg
{
}
/// <summary>
/// Fired when an Element was added to the children of this Element
/// </summary>
public event EventHandler<ChildAddedEventArgs> ChildAdded;
/// <summary>
/// Calls the <see cref="AddElement"/> method with the specified parameters.
/// </summary>
......@@ -311,6 +316,11 @@ namespace Svg
internal void OnElementAdded(SvgElement child, int index)
{
this.AddElement(child, index);
var handler = ChildAdded;
if(handler != null)
{
handler(this, new ChildAddedEventArgs { NewChild = child });
}
}
/// <summary>
......@@ -942,6 +952,14 @@ namespace Svg
public object Value;
}
/// <summary>
/// Describes the Attribute which was set
/// </summary>
public class ChildAddedEventArgs : SVGArg
{
public SvgElement NewChild;
}
//deriving class registers event actions and calls the actions if the event occurs
public interface ISvgEventCaller
{
......
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