1

I am creating a Windows Phone 7.5 Silverlight application. I am creating a new custom control:

public class ChartCanvas : Canvas

When I use it on another page, it doesn't fire any events. Here is my XAML:

<Controls:ChartCanvas x:Name="chartControl" 
                      Margin="8"
                      DoubleTap="chartControl_DoubleTap" 
                      ManipulationStarted="chartControl_ManipulationStarted" />

How do I enable the DoubleTap event and manipulation events for this control?

stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
Eugene
  • 1,515
  • 1
  • 13
  • 23

1 Answers1

0

You probably would want to bind your events to your datacontext's ViewModel since this would have a control that is generic that can have different implementation of handling the events.

Unless you explicitly coded in the ChartCanvas behind the code the logic for DoubleTap/ManipulationStarted and don't want it to be generic e.g. for handling data/stuff then this should be fine

123 456 789 0
  • 10,565
  • 4
  • 43
  • 72