如何为Windows Phone 7创建尺寸为480*640的c#摄像头UI部件?
我已将此代码用于xaml如何为Windows Phone 7创建尺寸为480*640的c#摄像头UI部件?,c#,windows-phone-7.1,C#,Windows Phone 7.1,我已将此代码用于xaml <!--LayoutRoot is the root grid where all page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.ColumnDefinitions> <ColumnDefinition Width="640" /> <Col
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="640" />
<ColumnDefinition Width="160" />
</Grid.ColumnDefinitions>
<Canvas x:Name="viewfinderCanvas" Width="640" Height="480"
HorizontalAlignment="Left" >
<!--Camera viewfinder -->
<Canvas.Background>
<VideoBrush x:Name="viewfinderBrush" />
</Canvas.Background>
</Canvas>
<!--Button StackPanel to the right of viewfinder>-->
<StackPanel Grid.Column="1" >
<Button x:Name="ShutterButton" Content="SH"
Click="ShutterButton_Click"
FontSize="26" FontWeight="ExtraBold" Height="75" />
</StackPanel>
<!--Used for debugging >-->
<TextBlock Height="40" HorizontalAlignment="Left" Margin="8,428,0,0"
Name="txtDebug" VerticalAlignment="Top" Width="626" FontSize="24"
FontWeight="ExtraBold" />
</Grid>
但我必须在C#(运行时)中创建它
我已经尝试了很多,但我找不到如何使用画布来显示图像。
请建议我如何在运行时制作它 要捕获图像,可以使用链接的文档。你也有可能有一个新的选择。这些链接应该让你开始。如果你遇到了更具体的问题,可以提问(可能是一个新问题)。不清楚你想要什么!1) 所有这些XAML代码都是用C#编写的?2) 摄像机在画布上显示的视频流(图片)?3) 在快门按钮上捕捉图片?单击并在画布上显示?