System.Windows.Forms.ComboBox.ObjectCollection.Clear C# (CSharp) Method

Clear() public method

public Clear ( ) : void
return void
			public void Clear ()
			{
				owner.selected_index = -1;
				object_items.Clear ();
				owner.UpdatedItems ();
				owner.Refresh ();
				
				//UIA Framework event: Items list cleared
				OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Refresh, null));
			}

Usage Example

Example #1
0
		public void ClearTest ()
		{
			ComboBox.ObjectCollection col = new ComboBox.ObjectCollection (new ComboBox ());
			col.Add ("Item1");
			col.Add ("Item2");
			col.Clear ();
			Assert.AreEqual (0, col.Count, "#D1");
		}
All Usage Examples Of System.Windows.Forms.ComboBox.ObjectCollection::Clear