0
我想要一個「類似Snapchat」的UWP應用程序。類似Snapchat的應用程序
這裏是一個小的一段代碼:
<Grid>
<CaptureElement Stretch="Uniform"/>
<Button
x:Name="button1"
Content="Button"
Height="126" Width="162"
Click="button1_Click"
FontSize="72"
Margin="185,543,0,51"/>
</Grid>
不過,我想我的應用程序能夠在手機和桌面使用的,我希望能夠調整窗口的大小,讓它(使用VisualStateManager)自動調整
我試着用行來實現這一目標:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<CaptureElement Stretch="Uniform" Grid.Row="0"/>
<Button
x:Name="button1"
Content="Button"
Height="126" Width="162"
Click="button1_Click"
FontSize="12"
Grid.Row="1"/>
</Grid>
這似乎是確定,但圖片不是全屏 - 你可以清楚地將Button從CapturePreview中分離出來,但想法是隻用按鈕圖標進行全屏預覽。
有沒有一種方法可以實現我的想法?
Can' '解決問題? –
@ GraceFeng-MSFT你會添加到第一個代碼或第二個? –
@ GraceFeng-MSFT謝謝,實際上使圖標可見,但現在captureElement已伸出。 –