Tinkr2/4.2/AphelionCore/AphelionCommonControls/Controls/Combobox.cs
/// <summary>
/// Removes a item by its index
/// </summary>
/// <param name="index">Index of the item to remove</param>
Removes a item by its index
Removes a item by its index
public void RemoveItemAt(int index)
      {
         if (_items == null || index < 0 || index >= _items.Length)
         {
            return;
         }
         if (_items.Length == 1)
         {
            ClearItems();
            return;
         }
         Suspended = true;
         try
         {
            _items[index].Parent = null;
            var tmp = new ListboxItem[_items.Length - 1];
            int c = 0;
            for (int i = 0; i < _items.Length; i++)
            {
               if (i != index)
               {
                  tmp[c++] = _items[i];
               }
            }
         }
         finally
         {
            Suspended = false;
         }
      }
public void RemoveItemAt ( int index ) { if ( _items == null || index < 0 || index >= _items . Length ) { return ; } if ( _items . Length == 1 ) { ClearItems ( ) ; return ; } Suspended = true ; try { _items [ index ] . Parent = null ; var tmp = new ListboxItem [ _items . Length - 1 ] ; int c = 0 ; for ( int i = 0 ; i < _items . Length ; i ++ ) { if ( i != index ) { tmp [ c ++ ] = _items [ i ] ; } } } finally { Suspended = false ; } }
Removes a item by its index
Removes a item by its index
//if (_items[index] == _removing) //    return;
index
int
Index of the item to remove
Index of the item to remove