microsoft / microsoft/microsoft-ui-xaml
Changing the StartPoint property of PathFigure does not cause the figure to recalculate the drawing area
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
Describe the bug
I created a path to link my uielements, but when I tried to change StartPoint property, the line breaked at the former X-Y boundary, but when I changed the Point porperty of LineSegment, everything worked well.
before draging
after draging
Steps to reproduce the bug
- Create a path as followed and add it to page.
Path path = new();
PathGeometry _pathGeometry = new();
PathFigure _pathFigure = new();
LineSegment _bezierSegment = new();
_pathFigure.StartPoint = new(X, Y);
_pathFigure.IsClosed = false;
_pathFigure.Segments.Add(_bezierSegment);
_pathGeometry.Figures.Add(_pathFigure);
path.Data = _pathGeometry;
- change StartPoint property of PathFigure and Point property of LineSegment respectively. When startpoint changes out of the former drawing area, the boundary doesn't expand.
_pathFigure.StartPoint = new(X, Y);
_bezierSegment.Point = new(X, Y);
Expected behavior
No response
Screenshots
No response
NuGet package version
None
Windows version
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the PathFigure.StartPoint property and compare its drawing-area update behavior with LineSegment.Point, using the reproduction code in the issue. Trace how changing each property affects the path bounds; done means moving StartPoint beyond the former bounds expands the rendered drawing area without leaving the line clipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100