jamesmontemagno / ImageCirclePlugin

Circle Images for your Xamarin.Forms Applications
MIT License
240 stars 68 forks source link

ImageSource.FromResource Not Working in UWP #38

Closed hammad2224 closed 7 years ago

hammad2224 commented 7 years ago

When loading an image from PCL Xamarin Froms the image does not show up in UWP

Bug Information

Version Number of Plugin: 1.8.2.19-beta Device Tested On:Windows 10 64 Bit UWP Simulator Tested On: Local Machine Version of VS: 2015 Community 14.0.2542501 Update 3 Version of Xamarin: 2.3.4.247 Versions of other things you are using:

Steps to reproduce the Behavior

1) Create an image folder in PCL Xamarin Forms 2) Put an image there and change image Build Action to Embedded Resource 3) Create a list view and in item template with other items add the circle image

4) in app.xaml.cs add the following code List assembliesToInclude = new List(); assembliesToInclude.Add(typeof(ImageCircle.Forms.Plugin.UWP.ImageCircleRenderer).GetTypeInfo().Assembly); assembliesToInclude.Add(typeof(ImageCircle.Forms.Plugin.Abstractions.CircleImage).GetTypeInfo().Assembly); Xamarin.Forms.Forms.Init(e, assembliesToInclude); 5) Run the app and image does not show

Expected Behavior

Should show image like in Android

Actual Behavior

Does not show image in UWP

Code snippet

Screenshotst

list item using circle image app xaml cs project json display setting image from resource

jamesmontemagno commented 7 years ago

Does this work if you just use the standard Image and not CircleImage?

hammad2224 commented 7 years ago

Hi James,

Sorry my mistake image Build action was set to Embedded Resource which was causing the image not to display. changing the Build action on image resolved the issue and image circle works like a charm.

i have just one more question why the image is not as smooth from the edges as you can see in whatsApp round images?

Thanks Regards, Hammad Rafique

jamesmontemagno commented 7 years ago

They may be processing it different. Glad you got it working