Changes

XAML Tips

254 bytes added, 13:00
/* Using Path Data */
===== Using Path Data =====
<br>
The '''Mobile(Xamarin ) approach''' shows how to use svg data directly using a Path control.
The first step is to generate path data for your icon. The easiest way is to download the [https://apps.microsoft.com/detail/9wzdncrdxf41?hl=en-US&gl=US| Character Map] tool from Microsoft. This can be used to browse all installed icon files for your icon of choice. Once selected, use Tools > Xaml / Xamarin Forms to show various useful aspects of the icon. With an icon selected, the Path Geometry section can be used to generate a path data that can be pasted directly in your xaml as follows:
</source>
Once you have your Path control, you can customize it as [https://learn.microsoft.com/en-us/previous-versions/xamarin/xamarin-forms/user-interface/shapes/path| documented by Microsoft](Maui documentation: [https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/shapes/path?view=net-maui-9.0| see here]). Path data generated using the above method will most likely need a Fill attribute, for example <nowiki>Fill="{StaticResource UBIKAccentColor}"</nowiki>.
{{Hint|More complicated icons will have longer and more complicated paths.}}
<br>
[[Category:Client|XAML Tips]][[Category:Mobile|XAML Tips]][[Category:WinX|XAML Tips]][[Category:XAML|XAML Tips]]
== TabView ==
561
edits