/// <summary>
        /// Adds ContextPopupItem to items dictionary.
        /// </summary>
        /// <param name="item">Item to add to items dictionary.</param>
        void AddItem(ContextPopupItem item)
        {
            if (_items.ContainsKey(item))
            {
                return;
            }

            EContextPopupItem nativeItem;

            if (string.IsNullOrEmpty(item.Icon))
            {
                nativeItem = _popup.Append(item.Label);
            }
            else
            {
                nativeItem = AppendOrModifyItemWithIcon(item);
            }

            _items.Add(item, nativeItem);

            nativeItem.Selected += (s, e) =>
            {
                SelectedItem = item; // This will invoke SelectedIndexChanged if the index has changed
                ItemSelected?.Invoke(this, EventArgs.Empty);
            };
        }
        void AddItem(ContextPopupItem item)
        {
            if (_items.ContainsKey(item))
            {
                return;
            }

            EContextPopupItem nativeItem;

            nativeItem = _popup.Append(item.Label);
            _items.Add(item, nativeItem);

            nativeItem.Selected += (s, e) =>
            {
                SelectedItem = item; // This will invoke SelectedIndexChanged if the index has changed
                ItemSelected?.Invoke(this, new SelectedItemChangedEventArgs(SelectedItem));
            };
        }