So, I am building a Silverlight 2 application related to my trip to Klipsch in Indianapolis this year, and found what seems to be to be a terrible bug in Silverlight 2 beta 2. Multiple UIElements cannot share event handlers. What do I mean? In my case, I have varous Paths inside a canvas and I'm creating hotspots. When the mouse enters a given region, something slightly different will happen, however the exact same method is called for every single region when the mouse exits that Path. So, suppose I have a Path called Damon, which happens to have some Damon-y things inside it and I'm going to display my name:
{
AddCallout(
}
When the mouse exists, I simply remove the UIElement representing the callout, which is the same for all regions on the page:
RemoveOldCallout();
Now, it would seem that I could make the functionality in RemoveOldCallout a MouseEventHandler and share the same method among the various paths:
Now, I have to write a different MouseLeave event for every single path on my page, and there's a lot of them. I'll submit to Connect and hope this issue is fixed!
Remember Me
a@href@title, strike
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Damon Payne
E-mail