maui
maui copied to clipboard
[Shapes] Path render wrong position
Description
There is a svg.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1654175462579" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="2178"
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
<defs>
<style type="text/css"></style>
</defs>
<path d="M353.6 865.6h-192c-17.6 0-32-14.4-32-32v-704c0-17.6 14.4-32 32-32h640c17.6 0 32 14.4 32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32v-256c0-52.8-43.2-96-96-96h-640c-52.8 0-96 43.2-96 96v704c0 52.8 43.2 96 96 96h192c17.6 0 32-14.4 32-32s-14.4-32-32-32z" fill="#13227a"></path>
<path d="M737.6 289.6c0-17.6-14.4-32-32-32h-448c-17.6 0-32 14.4-32 32s14.4 32 32 32h448c17.6 0 32-14.4 32-32zM257.6 449.6c-17.6 0-32 14.4-32 32s14.4 32 32 32h96c17.6 0 32-14.4 32-32s-14.4-32-32-32h-96z" fill="#13227a"></path>
<path d="M948.8 936L892.8 880c89.6-112 81.6-275.2-20.8-379.2-56-56-128-83.2-201.6-83.2s-145.6 27.2-201.6 83.2c-110.4 110.4-110.4 291.2 0 403.2 56 56 128 83.2 201.6 83.2 62.4 0 124.8-20.8 177.6-62.4l56 56c6.4 6.4 14.4 9.6 22.4 9.6s16-3.2 22.4-9.6c12.8-12.8 12.8-32 0-44.8z m-278.4-12.8c-59.2 0-113.6-22.4-156.8-64-41.6-41.6-64-97.6-64-156.8 0-59.2 22.4-113.6 64-156.8 41.6-41.6 97.6-64 156.8-64s113.6 22.4 156.8 64c41.6 41.6 64 97.6 64 156.8 0 59.2-22.4 113.6-64 156.8-43.2 41.6-97.6 64-156.8 64z" fill="#13227a"></path>
</svg>
And it render in Chrome
I convert it to xaml render in wpf
<Viewbox>
<Grid>
<Path Data="M353.6 865.6h-192c-17.6 0-32-14.4-32-32v-704c0-17.6 14.4-32 32-32h640c17.6 0 32 14.4 32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32v-256c0-52.8-43.2-96-96-96h-640c-52.8 0-96 43.2-96 96v704c0 52.8 43.2 96 96 96h192c17.6 0 32-14.4 32-32s-14.4-32-32-32z" Fill="#13227a" />
<Path Data="M737.6 289.6c0-17.6-14.4-32-32-32h-448c-17.6 0-32 14.4-32 32s14.4 32 32 32h448c17.6 0 32-14.4 32-32zM257.6 449.6c-17.6 0-32 14.4-32 32s14.4 32 32 32h96c17.6 0 32-14.4 32-32s-14.4-32-32-32h-96z" Fill="#13227a" />
<Path Data="M948.8 936L892.8 880c89.6-112 81.6-275.2-20.8-379.2-56-56-128-83.2-201.6-83.2s-145.6 27.2-201.6 83.2c-110.4 110.4-110.4 291.2 0 403.2 56 56 128 83.2 201.6 83.2 62.4 0 124.8-20.8 177.6-62.4l56 56c6.4 6.4 14.4 9.6 22.4 9.6s16-3.2 22.4-9.6c12.8-12.8 12.8-32 0-44.8z m-278.4-12.8c-59.2 0-113.6-22.4-156.8-64-41.6-41.6-64-97.6-64-156.8 0-59.2 22.4-113.6 64-156.8 41.6-41.6 97.6-64 156.8-64s113.6 22.4 156.8 64c41.6 41.6 64 97.6 64 156.8 0 59.2-22.4 113.6-64 156.8-43.2 41.6-97.6 64-156.8 64z" Fill="#13227a" />
</Grid>
</Viewbox>
It also render right. Screenshot in preview window.
But if put it in maui xaml
All things position is based left 0 top 0
Steps to Reproduce
- Create a MAUI App
- Add Xaml to MainPage
Version with bug
6.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows, I was not able test on other platforms
Affected platform versions
Windows SDK 10.0.19041.0
Did you find any workaround?
No response
Relevant log output
No response
I had tried something like this before in Xamarin forms. The advantage, you can make every path clickable. That would be good if positioned correctly
The start point rendering position of all shapes is incorrect
@jsuarezruiz
not repro with vs main build 32609.239
How to use your version "main build 32609.239"
@VincentBu
It's an internal version. You may have to wait for update.
@VincentBu when and in what version is that update comming im running into the exact same Problem with drawing lines.
Verified this on Visual Studio Enterprise 17.6.0 Preview 7.0. This issue does not repro on Windows 11 and Android 13.0 with below Project: 7700.zip
Hi @gxrsprite. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.