Different Windows Phone (43)

Source: Internet
Author: User
Tags xmlns

8.0 Cameras and photos: Scalability of lenses, scalability of images, automatic upload of images

Introduced

Unique Windows Phone 8.0 camera and photos

The scalability of the lens

The scalability of a picture

Automatic upload and extension of pictures

Example

1. Demo How to register this app as a lens extension

Cameraandphoto/lensextensibility.xaml

<phone:phoneapplicationpage x:class= "Demo.CameraAndPhoto.LensExtensibility" xmlns= "Http://schemas.microsoft . Com/winfx/2006/xaml/presentation "xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "xmlns:phone=" Clr-namespace:microsoft.phone.controls;assembly=microsoft.phone "Xmlns:shell=" Clr-namespace:
    Microsoft.phone.shell;assembly=microsoft.phone "xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 " Xmlns:mc= "http://schemas.openxmlformats.org/markup-compatibility/2006" fontfamily= "{StaticResource Phonefontfamilynormal} "fontsize=" {StaticResource phonefontsizenormal} "foreground=" {StaticResource PhoneForegroun Dbrush} "supportedorientations=" Portrait "orientation=" Portrait "mc:ignorable=" D "shell:systemtray.isvisible="   
       
            True "> <grid background=" Transparent "> <stackpanel orientation=" Vertical ">   
<textblock x:name= "Lblmsg" text= to start the camera, you can start this app with the "filter"/>       
            <button x:name= "btnphotocapture" content= "Use this app to take a picture" click= "Btnphotocapture_click"/>   
       
        <button x:name= "btnaudiovideocapture" content= "Use this app video" click= "Btnaudiovideocapture_click"/> </StackPanel> </Grid> </phone:PhoneApplicationPage>

Cameraandphoto/lensextensibility.xaml.cs

* * Demonstrates how to register this app as lens extension * * 1, need to add configuration <extension taskid= "_default" extensionname= "manifest" camera_cap Ture_app "consumerid=" {5b04b775-356b-4aa0-aaf8-6491ffea5631} "/> * 2, add 3 files to the Assets root folder as icon for lens selector * Len s.screen-wvga.png-800*480 15:9 * lens.screen-wxga.png-1280*768 15:9 * lens.screen-720p.png-1280*720 1   
 6:9 * * * NOTE: * Related urimapper See MyUriMapper.cs * * * What is lens expansion?   
* is to open the camera, click the "Filter" button, there will be a row of app list, where each app is a lens extender/using System.Collections.Generic;   
Using System.Windows.Navigation;   
Using Microsoft.Phone.Controls;   
       
Using System;   
        namespace Demo.cameraandphoto {public partial class Lensextensibility:phoneapplicationpage {   
        Public lensextensibility () {InitializeComponent (); } protected override void Onnavigatedto (NavigationEventArgs e) {IDictionary<string, string> querystrings = this.   
       
            navigationcontext.querystring;   
            if (Querystrings.containskey ("Fromlens")) {Lblmsg.text = "You are starting the app by using the camera's filter"; Base.   
        Onnavigatedto (e);   
            } private void Btnphotocapture_click (object sender, System.Windows.RoutedEventArgs e) {   
        Navigationservice.navigate (New Uri ("/cameraandphoto/photocapturedevicedemo.xaml", urikind.relative));   
        } private void Btnaudiovideocapture_click (object sender, System.Windows.RoutedEventArgs e) {Navigationservice.navigate (New Uri ("/cameraandphoto/audiovideocapturedevicedemo.xaml", Urikind.relati   
        ve)); }   
    }   
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.