how can I add two new properties to the sealed Arc class.
I want to extend the class with a double property to hold a double value and a string property to hold the name of the object.
My first try was via the Tag property but this can only hold the double value OR the object name.
The problem is that I created a new user control with 43 arc objects and when the mouse entered an arc another control shows up the value and the name of the entered segment. So every arc uses the SAME MouseEntered function and I want to get the informations via the “object sender”.
I hope anyone has a nice idea.
You can’t. It’s sealed. Either:
Arcas a property.Arc.Tag.For your particular problem, I would suggest #2 above or to store a
Dictionary<Arc, blahblahblah>orDictionary<string, blahblahblah>(by name) and look up the info you need. #1 is a lot of overhead wrapping all the methods and properties you need for drawing, and probably more hassle than it’s worth.