I want to open windows phone 7 camera, take a snap and then manipulate that picture. But the problem is when I try to override the OnChooserReturn function it gives me the error no suitable method found to override also when I want to capture what returns from the camera I use this :
ChooserEventArgs<PhotoResult> args = new ChooserEventArgs<PhotoResult>()
It gives me the error The type or namespace name 'ChooserEventArgs' could not be found (are you missing a using directive or an assembly reference?) although I am using these two directives
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
What is the problem and how can I solve these issues?
It sounds like you are trying to use an old SDK or at least a guide based on an outdated SDK. To have the phone launch the Camera and then to reference the captured image you use the
CameraCaptureTask. You will need the following Using statements:Somewhere in your code (presumably in a button click event) you do this to launch the camera:
Then you handle the completed event like this (assuming you have an Image control named image):
Documentation Here: http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.cameracapturetask(v=VS.92).aspx