I think the problem may be in the panel you are using. Since I do not see the Grid.Row property in CaptureElement in XAML, I suspect that you are using a StackPanel - this is a panel that will not stretch on your screen, it just stacks the elements.
What you are trying to do should be possible with a Grid, as I have verified that the following code should work:
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <StackPanel Orientation="Vertical" Grid.Row="0"> <Button Click="InitCameraBtn_Click" Content="Initialize Camera" /> <Button Click="StartPreviewBtn_Click" Content="Start Capture Preview" /> <Button Click="StopPreviewBtn_Click" Content="Stop Capture Preview" /> </StackPanel> <CaptureElement x:Name="PhotoPreview" Stretch="UniformToFill" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"/> </Grid>
source share