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

Device.OnPlatform obsolete

$
0
0

How can I fix the warning about Device.OnPlatform obsolete? I know it was replace by using switch, but how can I fix Icon = Device.OnPlatform("tab_feed.png",null,null)

public static void SetMainPage()
{
    Current.MainPage = new TabbedPage
    {
        Children =
        {
            new NavigationPage(new ItemsPage())
            {
                Title = "Browse",
                Icon = Device.OnPlatform("tab_feed.png",null,null)
            },
            new NavigationPage(new AboutPage())
            {
                Title = "About",
                Icon = Device.OnPlatform("tab_about.png",null,null)
            },
        }
    };
}1.

Viewing all articles
Browse latest Browse all 91519

Trending Articles



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