public virtual object this[int index] {
get {
if (index < 0 || index >= Count)
throw new ArgumentOutOfRangeException ("index");
return object_items[index];
}
set {
if (index < 0 || index >= Count)
throw new ArgumentOutOfRangeException ("index");
if (value == null)
throw new ArgumentNullException ("value");
//UIA Framework event: Item Removed
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, object_items[index]));
object_items[index] = value;
//UIA Framework event: Item Added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, value));
//if (owner.listbox_ctrl != null)
// owner.listbox_ctrl.InvalidateItem (index);
if (index == owner.SelectedIndex)
{
if (owner.textbox_ctrl == null)
owner.Refresh ();
else
owner.textbox_ctrl.SelectedText = value.ToString ();
}
}
}