Browse Source

add change listener on static ctor

pull/5042/head
Jumar Macato 6 years ago
parent
commit
e90a5d285c
No known key found for this signature in database GPG Key ID: B19884DAC3A5BF3F
  1. 7
      src/Avalonia.Visuals/Media/PathFigure.cs

7
src/Avalonia.Visuals/Media/PathFigure.cs

@ -38,11 +38,14 @@ namespace Avalonia.Media
/// Initializes a new instance of the <see cref="PathFigure"/> class. /// Initializes a new instance of the <see cref="PathFigure"/> class.
/// </summary> /// </summary>
public PathFigure() public PathFigure()
{
Segments = new PathSegments();
}
static PathFigure()
{ {
SegmentsProperty.Changed.AddClassHandler<PathFigure>((s, e) => SegmentsProperty.Changed.AddClassHandler<PathFigure>((s, e) =>
s.OnSegmentsChanged(e.NewValue as PathSegments)); s.OnSegmentsChanged(e.NewValue as PathSegments));
Segments = new PathSegments();
} }
private void OnSegmentsChanged(PathSegments? arg2NewValue) private void OnSegmentsChanged(PathSegments? arg2NewValue)

Loading…
Cancel
Save