Question about inheritance and designer behaviour


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I'm confused about how properties work within the designer.



If I have a form and I add a public property to the form, after I build the assembly, the property is there in the property window.



However, if I have a BO or a UserControl and I add a property, after I build the assembly, the property isn't in the property windows of the UserControl or BO itself. It will be in the property window of an instance I've dropped on a form or some other container, but not in the designer for the object itself. The property will also show up in the property window of any sub-classed objects.



So, what determines what ends up in that little property window?
Reply
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
If I may expand up on this a little to address multiple layers of inheritance.

I have a base BO with properties defined, business objects that inherit from this base class have the properties visible in the designer when dropped on a form. Cool. Good stuff, no news here.

I now need to add another layer of inheritance so that:

BASE BO A - has a defined property that should be available to ALL BO's

BASE BO B - inherits from A and will have additional properties that only some BO's will ever need

BO C - inherits from B

My instance of B on the form does not have property as defined in A available in the designer, but I can reference/set it via code.

Why.. and how to fix?

Keith Chisarik

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search