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
b667a15a
Commit
b667a15a
authored
Mar 11, 2014
by
tebjan
Browse files
svg element has content changed event
parent
f541d280
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/SvgElement.cs
View file @
b667a15a
...
...
@@ -82,12 +82,12 @@ namespace Svg
var
oldVal
=
_content
;
_content
=
value
;
if
(
_content
!=
oldVal
)
On
Attribute
Changed
(
new
Attribute
EventArgs
{
Attribute
=
""
,
Value
=
value
});
On
Content
Changed
(
new
Content
EventArgs
{
Content
=
value
});
}
else
{
_content
=
value
;
On
Attribute
Changed
(
new
Attribute
EventArgs
{
Attribute
=
""
,
Value
=
value
});
On
Content
Changed
(
new
Content
EventArgs
{
Content
=
value
});
}
}
}
...
...
@@ -732,6 +732,20 @@ namespace Svg
}
}
/// <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
/*
...
...
@@ -952,6 +966,14 @@ namespace Svg
public
object
Value
;
}
/// <summary>
/// Content of this whas was set
/// </summary>
public
class
ContentEventArgs
:
SVGArg
{
public
string
Content
;
}
/// <summary>
/// Describes the Attribute which was set
/// </summary>
...
...
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