S
Siberwulf
First, I'm not sure wehre this should be posted, but the Concierge pointed me
here.
That sounds a little silly, I'll admin. This is a POC that I've developed
to help me troubleshoot an even broader (and I'm thinking related) issue. It
looks that some events are dropping from FrameworkElements when an unrelated
object is being instantiated from a XamlReader.
Here's the concept I'm trying to accomplish:
User can add one of two FrameworkElements to a Canvas. These framework
elements are defined in external Xaml files. (In reality, there will be N
number of Xaml files, but for this example, there are two).
Once the user clicks a button, their cursor is turned into an instance of
the FrameworkElement (Polygons in this case). When the user moves the cursor
around the screen, the instance is moved with it.
The user then clicks on the canvas somewhere, and a new instance of the
FrameworkElement is loaded from the Xaml file and added to the background
Canvas.
A Mouse Enter event is added, which turns the cursor into a hand, so the
user can see they are inside an existing Element, rather than over the Canvas.
That's the premise.
There's some major irregularities going on with this simple concept though.
When the user adds an element by clicking, the mouse enter event fires no
matter how/where they enter the element. However, when the user selects a
different polygon type, the mouse enter event only fires when they are moving
upward.
I've uploaded a full zip of project:
http://www.dev-elements.net/BrokenCanvas.zip
Thanks!
here.
That sounds a little silly, I'll admin. This is a POC that I've developed
to help me troubleshoot an even broader (and I'm thinking related) issue. It
looks that some events are dropping from FrameworkElements when an unrelated
object is being instantiated from a XamlReader.
Here's the concept I'm trying to accomplish:
User can add one of two FrameworkElements to a Canvas. These framework
elements are defined in external Xaml files. (In reality, there will be N
number of Xaml files, but for this example, there are two).
Once the user clicks a button, their cursor is turned into an instance of
the FrameworkElement (Polygons in this case). When the user moves the cursor
around the screen, the instance is moved with it.
The user then clicks on the canvas somewhere, and a new instance of the
FrameworkElement is loaded from the Xaml file and added to the background
Canvas.
A Mouse Enter event is added, which turns the cursor into a hand, so the
user can see they are inside an existing Element, rather than over the Canvas.
That's the premise.
There's some major irregularities going on with this simple concept though.
When the user adds an element by clicking, the mouse enter event fires no
matter how/where they enter the element. However, when the user selects a
different polygon type, the mouse enter event only fires when they are moving
upward.
I've uploaded a full zip of project:
http://www.dev-elements.net/BrokenCanvas.zip
Thanks!