Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
Images
README.md

README.md

id title brief article sdk
F743415E-9120-34FA-452C-3B7D54AA33CD
Add a Badge to a Tab Item
This recipe shows how to display a badge on a tab.

Recipe

A badge is a small red oval with white border than is displayed over the top-right corner of a tab. It is usually used to indicate the number of new items that will be displayed when the tab is selected (such as the Updates tab in the App Store).

A badge will appear on a tab if the BadgeValue property is set:

tab.TabBarItem.BadgeValue = "3";

To remove a badge that has been previously displayed, set the property to null:

tab.TabBarItem.BadgeValue = null;

Additional Information

You cannot use an empty string to clear the badge – that will result in the red and white circle appearing without any content.