Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
5fba6855
Commit
5fba6855
authored
Mar 09, 2014
by
tebjan
Browse files
added element added event
parent
88f9e289
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/SvgElement.cs
View file @
5fba6855
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment