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

TabbedPage bug?

$
0
0

Is this a bug or I should use it in another way?

public class MyQuestionsPage : ContentPage
{
    public MyQuestionsPage()
    {
        Title = "My Questions";
        Icon = "TabBar-Icon-MyQuestions";
    }
}

public static Page GetMainPage()
{   
    var mainPage = new TabbedPage();
    mainPage.Children.Add(new MyQuestionsPage());

    return mainPage;
}

and when run this I get an error:

Unhandled Exception:
System.Exception: Could not initialize an instance of the type 'MonoTouch.UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.

Why not UIImage.FromBundle ("imageNamed:")?

How can I provide icons for TabbedPage?


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>