1
votes

I have the following class that use :

var imageSource = ImageSource.FromResource(Source, Assembly.GetExecutingAssembly());

but when I use it in XAML :
<Button Text="sss" Image="{i18n:ImageResourceExtension TerminalAG.add-user-32.png}"/> <Image Source="{i18n:ImageResourceExtension TerminalAG.add-user-32.png}" />

Only the image show the picture no error what so ever. Any ideas.

I am givin the link I read from in advance since I had trouble coming the code :) https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/images?tabs=vswin

Thanks in advance

1
Do you want the image in button shortly , i apologize for misunderstanding. - Batuhan

1 Answers

0
votes

As of when the post was written only the image control supported the function. AS I have read about it's about to change in the future. As of now there are two ways to go about it put image resources in each project (as we did it just was easier). Or write a render to update them in the project folder on start.