System.Windows.Forms.ListBox.CollectionChanged C# (CSharp) Method

CollectionChanged() private method

private CollectionChanged ( ) : void
return void
		internal virtual void CollectionChanged ()
		{
			if (sorted) 
				Sort (false);
			
			if(Items == null)
				return;
			if (Items.Count == 0) {
				selected_indices.List.Clear ();
				focused_item = -1;
				top_index = 0;
			}
			if (Items.Count <= focused_item)
				focused_item = Items.Count - 1;
			if (!IsHandleCreated || suspend_layout)
				return;
			tableView.DataSource = new ListboxDataSource(this,Items);
			LayoutListBox ();
			refresh();
			base.Refresh ();
		}