My latest pet peeve
Erm, just a thought...but PLEASE...*PLEASE* add a .Tag or .Name property to MenuItem ..i'd be in love then :(
I agree, this one caused me some pain a while back. I was adding menu items dynamically based on user actions, and had no simple way to tie new menu items to specific data objects. I wound up having to use a Hashtable to look up objects from menu items; that works, but is a real pain to keep up to date and requires some references between objects I'd rather were independent from each other. I considered deriving a class from MenuItem, but I'd have to also create my own main menu component and designer.
True, but you could design the app using the normal MenuItem class, and then once you're done designing it, search.replace the class name with your own class that includes the Tag property. There was a thread on doing this a while back. -- ken
aye, i agree with that ken..but that's just a workaround for osmething that you would assume would be common enough to be included. I've implemented an IExtenderProvider in one solution and derived my own MenuItem in another situation...it isnt a big deal, like i said, it's just more of a pet peeve that would be nice to have.
I agree. I just read through this group looking for wish list items that are easily fixed with workarounds, in case folks are fighting with stuff. Didn't know your particular context here, but like you said, this is one place if would be useful to have a tag-like property.
How much of a hassle would it be move the Tag property from the Control class to the Component class? It shouldn't really be a breaking change as there isn't a tag property on any of the non-visual components (as far as I know). But, maybe there should be...