Hello,
I am studding Silverlight. I have an application where I create Polygons in UserControl_Loaded
method. During creation stage I add MouseLeftButtonUp event handler like this:
polygon.MouseLeftButtonUp += MouseButtonEventHandler_MouseLeftButtonUp;
All polygons have the same handler.
My goal is to use a custom object when I click on a polygon.
For instance, I have two polygons; both of them have int MyCustomInt32
property. The property is set during creation stage. For the first polygon it is set to 10, for the second one to 20. When the event fires I would like to retrieve and set MyCustomInt32 value. Of course, the value should be different, it depends on which polygon I click.
Is it possible to do in Silverlight?
Thank you.