Silverlight 4 Beta operating camera/microphone

Source: Internet
Author: User
Tags silverlight

Silverlight4beta brings a new and long-awaited feature: support for the camera/microphone.

This article will demonstrate this new feature through an example of the operation of the camera, and our example mainly implements the following features

Display device Name

Start/Stop capturing video

Real-time Image capture

Because the microphone is used in the same way as the camera, and can not be intuitive performance so here is not to repeat.

As usual, let's start with a simple UI, and the XAML

<UserControl.Resources>
<style targettype= "TextBlock" >
<setter property= "fontsize" value= "/>"
<setter property= "FontFamily" value= "Arial,simsun"/>
</Style>
<style targettype= "button" >
<setter property= "fontsize" value= "/>"
<setter property= "FontFamily" value= "SimSun"/>
<setter property= "Margin" value= "5"/>
</Style>
</UserControl.Resources>
<stackpanel x:name= "LayoutRoot" width= ">"
<TextBlock>
<run text= "Video device name:"/>
<run x:name= "Txtcameraname"/>
</TextBlock>
<border borderbrush= "Black" borderthickness= "2" width= "height=" >
<rectangle x:name= "Container" >

</Rectangle>
</Border>
<stackpanel orientation= "Horizontal" >
<button content= "Start" x:name= "Btnstart"/>
<button content= "Stop" x:name= "Btnstop"/>
<button content= "screenshots" x:name= "Btncapture"/>
</StackPanel>
<image x:name= "Imgcapture" width= "height=" "/>"
</StackPanel>

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.