Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Latest commit

 

History

History

add_a_badge_to_a_tab_item

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
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.