Camera Capture Task – Universal App

This blog post is About Camera Capture Task and how to use our Device’s Camera in my App if it was Windows 8.1 App or even Windows Phone 8.1 App, Let’s Start ๐Ÿ™‚

  1. Open Visual Studio 2013
  2. Create New Project and select Visual C# > Store Apps > Universal Apps > Blank App
  3. In the Solution you will find 3 projects:
    – Windows 8.1 Project
    – Windows Phone 8.1 Project
    – App.Shared Project (Anythingย will be Shared between the previous two projects)
  4. In Windows 8.1 Project, Open MainPage.xaml and Write the following xaml Code in the Main Grid:
    Grid xaml
  5. Open MainPage.xaml.cs file and write the following code:
    Windows C#
  6. Then Run the Windows 8.1 App ๐Ÿ˜‰

Now, we will do the same in the WP 8.1 but in MainPage.xaml for WP 8.1 we will add this line of code before <image/> tag
<CaptureElement x:Name=”capturePreview” Width=“320” Height=“240” />
and let the width and height the same for the image in WP.

and then in MainPage.xaml.cs write the following block of code:

And then run the on your device ๐Ÿ™‚

Download Code Sample HERE!


Arabic Video on Youtube ๐Ÿ™‚

Thanks for your time ๐Ÿ™‚
You will find my contacts in the Blog, Feel free to contact me anytime ๐Ÿ˜‰


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s