FYI: on the Windows Phone SDK 7.1 (aka "Mango") you can now write applications that use the device’s camera as you describe. See the App Hub for a link to the latest 7.1 development tools. The documentation describes how to do this at the following link:
How to create a base camera application for Windows Phone
, , (a.k.a. "" ). , , :
<Rectangle Width="640" Height="480"
HorizontalAlignment="Left"
x:Name="viewfinderContainer">
<Rectangle.Fill>
<VideoBrush x:Name="viewfinderBrush" />
</Rectangle.Fill>
</Rectangle>
, Microsoft.XNA.Framework :
using Microsoft.Devices;
using System.IO;
using System.IO.IsolatedStorage;
using System.Windows.Media.Imaging;
using Microsoft.Xna.Framework.Media;
: , . Visual Studio (Pro, ) , : | .
, , OnNavigatedTo...
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
cam = new Microsoft.Devices.PhotoCamera();
viewfinderBrush.SetSource(cam);
}
... OnNavigatingFrom.
protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e)
{
cam.Dispose();
}
7.1 . , Silverlight, Mango.
API Windows Phone
, PhotoCamera Windows Phone OS 7.1.