Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Adding a Forms ImageView from a iOS custom renderer is broken...

$
0
0

I want to be able to add a Forms Image from within a custom renderer. On Android this code works fine; but not on iOS...

ImageSource imgSource = ResourceHelper.GetImageName("Bets", "Logo");
    Image img = new Image () {
        Source = imgSource,
        WidthRequest = 30,
        HeightRequest = 30,
        };

    var imgRenderer = new ImageRenderer();
    imgRenderer.SetElement (img);
    myAndroidCustomRendererView.AddView(imgRenderer);

Viewing all articles
Browse latest Browse all 58056

Trending Articles