Create Event in WPF
I want to rise an event to zoom in and zoom out the image once the gesture is recognized that it is valid (gesture recognized by Kinect). my image is shown in different user control loaded in a frame present in main window.
<Frame Name="currentFrame" NavigationUIVisibility="Hidden"></Frame>
and frame source is set like this.
currentFrame.Source = new Uri("Images.xaml", UriKind.RelativeOrAbsolute);
How can i create the custom event? and which one is the best ? tunnel or bubble?
I think in your case it's better to use tunel event, as what you need is immediate feedback from the user interaction and execute a single action on that: zooming. So there is no sence of notifying other controls between your usecontrol canvas (if any) and actual handling code.
For concrete implementation of the event, can have a look on: