Generic property


Author
Message
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I am using DevExpress ribbon control as my form toolbar. I want to implement the behavour like SF maintenance toolstrip to it. In order to reuse my code in casde i want to use other control as my maintenance toolbar in the future, I planned to write an controller/behavour class to control the logic.



My current problem is, I need some way to access those button (ribbon control bar item/maintenance toolstrip button) in order to disable/enable them. I was thinking to have property to store object reference of each button accordingly. I used "control" as my property type. However, I might not able to access certain property that exist in toolbar button such as tooltiptext if I do so.



Anyway I can "set" tyoe to property during runtime? I tried to take a look at generic, but I only see it work for List. Is it?



Ady ideas?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, I am not totally sure I understand what you are trying to do, but I would think that handling form events would be the way to go rather than storing off an object reference.  This will ensure encapsulation as well as reusability.  If you look, you will see that the SF forms have many of the same events as the BOs....they just cover all of the BOs on the form.  Also, you will want to call the Save(), Add(), etc. on the SF form to get the same behaviour as the MaintenanceFormToolstrip.  Just a few ideas.
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