-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG from URL example on Maui #51
Comments
Hi, @Tricky0815 As of right now the only images that you can show are embedded, I do have a long-term plan though to add a URL-based download mechanism it's just that I did not get the time to do so, Also I don't see myself getting the time to do this for a couple of weeks, Maui is still quite new and even I am getting used to it so this might take some time. A lot of existing XF things are broken in Maui which is also one of the reasons why I don't feel like putting too much time into this. |
As a workaround, you could download the SVG as a base64 and then use the control, something like this https://stackoverflow.com/a/57778005/7462031 but make sure you are handling threads properly to avoid Memory leaks :) |
Have done some research and came to the following working solution (could take some optimizations for sure), but should represent the idea via MVVM - its also a kind of a workaround, means - downloading it, converting it to an PNG and bind its imagesource from the file. Hope this helps someone...
Code-Behind - MainPage.cs:
MainViewModel:
|
@Tricky0815 Thanks for your solution, Happy that it worked out. I would like to keep this open so I can pick this up whenever in my opinion I have enough time and make this an inbuilt feature. Hope you don't mind! |
@Tricky0815 Keep an eye out for #86 I am planning to release it by the weekend maybe sooner as a pre-release but this will be out soon, does not have caching implemented yet but I will do that soon too. To add this i had to write the whole control again from scratch 😄 Hope its useful to you! |
Is there any possibility to get an example of showing svgs from remote urls?
The samples only provides a constant "SvgUrl" which is never used...
The text was updated successfully, but these errors were encountered: