Any Sample of ShellItemRenderer iOS

Hema.0937Hema.0937 USMember ✭✭

I'm trying to create a ShellItemRenderer for IOS

public class MyCustomShellItemRenderer : ShellItemRenderer
{
#region Private Variables

    #endregion

    #region Constructor

    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="context"></param>
    public MyCustomShellItemRenderer(IShellContext context) : base(context)
    {
    }

    #endregion


    public override void ViewDidLoad()
    {
        base.ViewDidLoad();
    }
    #region Override Events
    protected override void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
    {

        base.OnItemsCollectionChanged(sender, e);
        if (e.NewItems != null && e.NewItems.Count > 0)
        {
            for (int i = 0; i < ShellItem.Items.Count; i++)
            {
                ApplyBadge((BaseShellSection)ShellItem.Items[i], ((BaseShellSection)ShellItem.Items[i]).BadgeText, ShellItem.IsChecked, TabBar.Items[i]);
            }

        }
    }


    protected override void OnShellSectionPropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        base.OnShellSectionPropertyChanged(sender, e);
        if (e.PropertyName == BaseShellSection.BadgeTextProperty.PropertyName ||
            e.PropertyName == nameof(BaseShellSection.EffectiveBadgeColor) ||
            e.PropertyName == nameof(BaseShellSection.EffectiveBadgeTextColor))
        {
            var shellSection = (BaseShellSection)sender;
            var index = ShellItem.Items.IndexOf(shellSection);
            ApplyBadge(shellSection, shellSection.BadgeText, shellSection.IsChecked, TabBar.Items[index]);
        }
    }
    #endregion

    #region Private Routines

    /// <summary>
    /// Apply Badge to the tab
    /// </summary>
    private void ApplyBadge(BaseShellSection baseShellItem, string badgeText, bool isSelected, UITabBarItem tabBarItem)
    {



    }

Posts

  • Hema.0937Hema.0937 USMember ✭✭

    Basically I'm seeing a blank bottom tab when I'm doing this. There are no samples on ShellRenderers

Sign In or Register to comment.