I am using VisualStudio 11 beta for windows 8 metro apps development, I have a error.
Error is:
Cannot implicitly convert type
'System.EventHandler<Windows.UI.Input.ManipulationStartedEventArgs>' to
'Windows.UI.Xaml.Input.ManipulationStartedEventHandler'
and my code is.
selectRectangle.ManipulationStarted += new EventHandler<ManipulationStartedEventArgs>(OnRectangleManipulationStarted);
ellipseTL.ManipulationStarted += new EventHandler<ManipulationStartedEventArgs>(OnRectangleManipulationStarted);
I haven’t worked with VS 2012 for Metro yet, but from what I understand, Metro/.NET 4.5 does a bit of reorganization of namespaces, or at least the selectRectangle/ellipseTL.ManipulationStarted events use a different class. Certainly in this case, they’re looking for a
ManipulationStartedEventHandlernot anEventHandler<>.Try this instead:
Or use the implicit event handler syntax:
But like I said, I haven’t worked with the new API yet, so this is just a best guess from my experience with 4.0.
EDIT: You might also need to change the signature of your OnRectangleManipulationStarted method to match the ManipulationStartedEventHandler signature.