More silverlight woes, but I am unsure if this is a bug or not.
An object (in this case a circle) with a mouse-over that shows a tooltip, a name and mouse-exit that hides said tooltip.
Works perfectly if the mouse enters the circle and exist without touching the tooltip, but if the mouse moves over the now displayed tooltip the circle receives the mouse-exit and hides the tooltip then the mouse moves and the tooltip is shown again, flickering on and off.
Silverlight has a HitTest function so I should be able to test to see if the entry into the tooltip is in-fact still over the circle but NO the mouse-exit refuses to tell you where the mouse is.
hmmm? So I wrote a global mouse-move update global position handler and ...
Same issue. Turns out the mouse-move fires as the mouse moves to the edge of the circle but the moment the mouse exist the mouse-exit fires and at that point my global position is still inside the circle, grrrrrr!
Not sure how to fix this one, the obvious way is to move the tooltip but that spoils the whole look of the application.
Todays reason for disliking silverlight:
Error messages; Either you get "Catastrophic Failure" which actually means the XAML is referring to an object that does not exist or one of a number of generic error messages that tell you absolutely nothing about the issue.
I will expand on that last one with an example. I wanted to dynamically create an object and animate it. To do this I had to create a Storyboard to hold the animation, create the object and assign it a render transform (e.g. rotate), create a doubleanimation (thats double as in floating point number), stick them all together and apply them to the root canvas.
This compiled but when I started the animation I would get either an ERROR or and ERROR and a known meaningless hex value. I tried all sorts of things, turned out that the Render Transform had to be created separately and assigned instead of being used from within the valid element I was using.
And another gotcha on that side of things, a doubleanimation has a target property e.g. Angle for a rotate transform and Opacity when you are fading in or out. But where with Opacity (and a number of other animation types) you target the object for rotate you must target the render transform IN the object, even though you are explicitly referencing Angle ...
I found a proper silverlight bug (that I reported), a border object in a canvas is not displayed when said canvas is dynamically unhidden, everything else on the canvas is unhidden along with it but the border stays invisible.