A
A
Alexander Dolmatov2016-07-12 10:32:27
XAML
Alexander Dolmatov, 2016-07-12 10:32:27

C# and XAML. How to call the camera?

Good day to all. I am new to this business and would like to learn from the pros how to call, for example, a camera or a calculator (or any other standard application on Windows Phone) by pressing a button, and how to call a third-party application (including those that are not installed on Windows Phone)?
private void button1_Click(object sender, RoutedEventArgs e)
{
// what should be written here to call the camera or another standard application???
}
PS I found something similar, but this is for windows phone 7, but I need it for 8 or 8.1, who can help ???
CameraCaptureTask
Launches the Camera application. Used to allow the
user to take a photo from within your application.
using Microsoft.Phone.Tasks;
private void Camera_Click(object sender, RoutedEventArgs e)
{
CameraCaptureTask camera = new CameraCaptureTask();
camera.Completed += new EventHandler(camera_Completed);
camera.Show();
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-07-12
@Rou1997

For WP 8, use CameraCaptureTask too, no problems will arise, and if you are writing an application for WP 8.1, then FileOpenPicker.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question