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

Adding a Badge to a ContentPage - Does Nothing?

$
0
0

xForms 1.3.1

I have a simple page that is a child of a TabbedPage:

    public class MorePage: ContentPage
    {
        public MorePage()
        {
            this.Title = "More";
            Icon = Images.Tab_Plus;
        }
    }

Because it is an iOS only feature, I use a Renderer (simplified):

[assembly: ExportRenderer(typeof(MorePage), typeof(CustomPageRenderer))]
namespace Common.IOS.Renderers
{
    public class CustomPageRenderer : PageRenderer
    {
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            ViewController.TabBarItem.BadgeValue = "5";
        }
    }
}

Does nothing.

Any ideas what's up?

I note that the code does hit the renderer.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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