diff --git a/doc/ReleaseNotes/_ReleaseNotes.md b/doc/ReleaseNotes/_ReleaseNotes.md index 8d3d536ad536..56e0af0e3a69 100644 --- a/doc/ReleaseNotes/_ReleaseNotes.md +++ b/doc/ReleaseNotes/_ReleaseNotes.md @@ -58,6 +58,7 @@ * Fixed invalid iOS assets folder. `ImageAsset` nodes must not be `false` to be copied to the generated project. * Make CollectionViewSource.View a proper DependencyProperty (#697) + * Fixed support for string support for `Path.Data` (#698) ## Release 1.43.1 diff --git a/src/SourceGenerators/XamlGenerationTests/PathTest.xaml b/src/SourceGenerators/XamlGenerationTests/PathTest.xaml index d82a6517365e..92aafc7c840e 100644 --- a/src/SourceGenerators/XamlGenerationTests/PathTest.xaml +++ b/src/SourceGenerators/XamlGenerationTests/PathTest.xaml @@ -8,7 +8,14 @@ d:DesignHeight="300" d:DesignWidth="400"> + + M 10,100.5 C 10,300 300,-200 300,100 Z + + + diff --git a/src/Uno.UI/UI/Xaml/Media/Geometry.cs b/src/Uno.UI/UI/Xaml/Media/Geometry.cs index 353985f1de2e..ab6a5d7d2a52 100644 --- a/src/Uno.UI/UI/Xaml/Media/Geometry.cs +++ b/src/Uno.UI/UI/Xaml/Media/Geometry.cs @@ -30,6 +30,11 @@ public Geometry() InitializeBinder(); } + public static implicit operator Geometry(string path) + { + return Parsers.ParseGeometry(path, CultureInfo.InvariantCulture); + } + #region Transform public Transform Transform diff --git a/src/Uno.UI/UI/Xaml/Media/Geometry.wasm.cs b/src/Uno.UI/UI/Xaml/Media/Geometry.wasm.cs deleted file mode 100644 index 6b55236b89fe..000000000000 --- a/src/Uno.UI/UI/Xaml/Media/Geometry.wasm.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Windows.UI.Xaml.Media -{ - partial class Geometry - { - - public static implicit operator Geometry(string data) - { - return new GeometryData(data); - } - } -}