Пример #1
0
        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);
        }
Пример #2
0
        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));
        }