jamesmontemagno / ImageCirclePlugin

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

ImageCircle not working for UWP #91

Open Mittchel opened 4 years ago

Mittchel commented 4 years ago

Issue Information

Version Number of Plugin: 3.0.0.5 Device Tested On: - Simulator Tested On: Default simulator Version of VS: 2019 - 4.8.03752 Version of Xamarin: 16.4.000.308

Code used:

<imageCircle:CircleImage Source="monkey.jpg" Aspect="AspectFill" Margin="10, 0, 0, 0" BorderColor="Red" BorderThickness="2">
    <imageCircle:CircleImage.WidthRequest>
        <OnPlatform x:TypeArguments="x:Double">
            <On Platform="Android, iOS">65</On>
            <On Platform="WinPhone">75</On>
        </OnPlatform>
    </imageCircle:CircleImage.WidthRequest>
    <imageCircle:CircleImage.HeightRequest>
        <OnPlatform x:TypeArguments="x:Double">
            <On Platform="Android, iOS">65</On>
            <On Platform="WinPhone">75</On>
        </OnPlatform>
    </imageCircle:CircleImage.HeightRequest>
</imageCircle:CircleImage>

I've added the following code into the OnLaunched of UWP:

var rendererAssemblies = new[]
{
    typeof(ImageCircleRenderer).GetTypeInfo().Assembly
};

Xamarin.Forms.Forms.Init(e, rendererAssemblies);

On UWP the plugin doesn't show the image. I tried to replace it with a regular Image and that actually works so I know the image or the location of the image isn't a problem.

<Image Source="monkey.jpg" />

I hope you can help me find out why it isn't working for UWP