[core] Fix tests when converting with PT Locale #23764
Merged
+16
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Make the conversion to string with InvariantCulture so tests also work in computer with different locale.
This pull request includes changes to the
ParsePathFigureCollectionToString
method in thePathFigureCollectionConverter.cs
file. The changes involve updating the way coordinates are converted to strings, specifically switching from the"R"
format to usingCultureInfo.InvariantCulture
.Here are the key changes:
src/Controls/src/Core/Shapes/PathFigureCollectionConverter.cs
: Updated the string conversion of various points in theParsePathFigureCollectionToString
method. TheToString
method now usesCultureInfo.InvariantCulture
instead of the"R"
format. This change is applied to theStartPoint
ofpathFigure
,Point
oflineSegment
,Point1
,Point2
, andPoint3
ofbezierSegment
,Point1
andPoint2
ofquadraticBezierSegment
, andPoint
ofarcSegment
. [1] [2]