Browse Source
* Add failing Path Geometry update test #4748 [BUG] Rerender on change for Paths, Segments and e.g. Failing Test * Fixes failing Path Geometry update test Fixes #4748 [BUG] Rerender on change for Paths, Segments and e.g.pull/18076/head
committed by
GitHub
2 changed files with 33 additions and 1 deletions
@ -0,0 +1,32 @@ |
|||
using Avalonia.Media; |
|||
using Xunit; |
|||
|
|||
namespace Avalonia.Base.UnitTests.Media; |
|||
|
|||
public class PathGeometryTests |
|||
{ |
|||
[Fact] |
|||
public void PathGeometry_Triggers_Invalidation_On_Figures_Add() |
|||
{ |
|||
var segment = new PolyLineSegment() |
|||
{ |
|||
Points = [new Point(1, 1), new Point(2, 2)] |
|||
}; |
|||
|
|||
var figure = new PathFigure() |
|||
{ |
|||
Segments = [segment], |
|||
IsClosed = false, |
|||
IsFilled = false, |
|||
}; |
|||
|
|||
var target = new PathGeometry(); |
|||
|
|||
var changed = false; |
|||
|
|||
target.Changed += (_, _) => { changed = true; }; |
|||
|
|||
target.Figures?.Add(figure); |
|||
Assert.True(changed); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue