This repository was archived by the owner on May 1, 2024. It is now read-only.
[Shapes] Converting xaml graphics with multiple paths? #11631
Unanswered
MitchBomcanhao
asked this question in
General
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
This is an old post, However, WPF had a ViewBox that handled this. I found this solution online somewhere a long time ago. I put all of my Shapes inside of a View box so I can scale them correctly `[ContentProperty(nameof(Content))]
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We've got a very large number of icons that we currently use via a custom font.
There are some scenarios where using the new shapes feature would be better suited, but I've hit a niggle.
The xaml variant of said icons mostly only has 1 Path node that directly translates to the Xamarin implementation, so we can just copy the relevant node and it'll work almost as is. I can probably create a powershell script that scrapes the nearly 2k xaml files and makes a resource dictionary with the required Path content.
translates to Xamarin xaml such as
<Path Fill="Black" Aspect="Uniform" Data="STUFF" />
Now for the niggle... Some icons have multiple path nodes. But what to do with stuff like this? How can I make multiple paths into a single resource that I can render correctly in Xamarin?
I can't just put the paths into a container because individual paths will scale independently and will not create the expected shape in the end.
tagging @jsuarezruiz :)
Beta Was this translation helpful? Give feedback.
All reactions