public override EventDescriptorCollection GetEvents() { var coll = base.GetEvents(); var list = new EventDescriptor[coll.Count]; for (int i = 0; i < coll.Count; i++) if (coll[i].Name == "TextChanged")//instead of TextChanged slip BindingTextChanged for binding list[i] = new FooTextChangedDescriptor(coll[i]); else list[i] = coll[i]; return new EventDescriptorCollection(list); }
public override EventDescriptorCollection GetEvents() { var coll = base.GetEvents(); var list = new EventDescriptor[coll.Count]; for (int i = 0; i < coll.Count; i++) { if (coll[i].Name == "TextChanged")//instead of TextChanged slip BindingTextChanged for binding { list[i] = new FooTextChangedDescriptor(coll[i]); } else { list[i] = coll[i]; } } return(new EventDescriptorCollection(list)); }