Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So here are two solutions:</p> <p>The first one is with the application bar not being transparent:</p> <pre><code>&lt;Grid x:Name="LayoutRoot" Background="Transparent"&gt; &lt;DrawingSurface x:Name="DrawingSurfaceBackground" Loaded="DrawingSurfaceBackground_Loaded" /&gt; &lt;ScrollViewer Name="LightControl" Height="150" VerticalAlignment="Bottom" Visibility="Collapsed"&gt; &lt;Grid Margin="12,0,12,0"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;TextBlock Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" Text="Ambient Light" Style="{StaticResource PhoneTextLargeStyle}" /&gt; &lt;Slider Grid.Column="1" Grid.Row="0" Name="AmbientLightSlider" Minimum="0.0" Maximum="2.0" Value="1.0" ValueChanged="AmbientLightSlider_OnValueChanged" /&gt; &lt;TextBlock Grid.Column="0" Grid.Row="1" VerticalAlignment="Top" Text="Diffuse Light" Style="{StaticResource PhoneTextLargeStyle}" /&gt; &lt;Slider Grid.Column="1" Grid.Row="1" Name="DiffuseLightSlider" Minimum="0.0" Maximum="2.0" Value="1.0" ValueChanged="DiffuseLightSlider_OnValueChanged" /&gt; &lt;TextBlock Grid.Column="0" Grid.Row="2" VerticalAlignment="Top" Text="Specular Light" Style="{StaticResource PhoneTextLargeStyle}" /&gt; &lt;Slider Grid.Column="1" Grid.Row="2" Name="SpecularLightSlider" Minimum="0.0" Maximum="2.0" Value="1.0" ValueChanged="SpecularLightSlider_OnValueChanged" /&gt; &lt;/Grid&gt; &lt;/ScrollViewer&gt; &lt;/Grid&gt; &lt;phone:PhoneApplicationPage.ApplicationBar&gt; &lt;shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"&gt; &lt;shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Center.png" Text="Center" Click="Center_Click" /&gt; &lt;shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Wireframe.png" Text="Wireframe" Click="Rasterizer_Click" /&gt; &lt;shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Center.png" Text="Light" Click="Light_Click" /&gt; &lt;/shell:ApplicationBar&gt; &lt;/phone:PhoneApplicationPage.ApplicationBar&gt; </code></pre> <p>I actually have changed the height of the <code>ScrollViewer</code>: <code>Height="150"</code> so only two sliders will fit and completely removed the opacity from the app bar: <code>Opacity="0"</code>.</p> <p>Now with transparent application bar:</p> <pre><code>&lt;Grid x:Name="LayoutRoot" Background="Transparent"&gt; &lt;DrawingSurface x:Name="DrawingSurfaceBackground" Loaded="DrawingSurfaceBackground_Loaded" /&gt; &lt;ScrollViewer Name="LightControl" Height="150" Margin="0,0,0,70" VerticalAlignment="Bottom" Visibility="Collapsed"&gt; &lt;Grid Margin="12,0,12,0"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;TextBlock Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" Text="Ambient Light" Style="{StaticResource PhoneTextLargeStyle}" /&gt; &lt;Slider Grid.Column="1" Grid.Row="0" Name="AmbientLightSlider" Minimum="0.0" Maximum="2.0" Value="1.0" ValueChanged="AmbientLightSlider_OnValueChanged" /&gt; &lt;TextBlock Grid.Column="0" Grid.Row="1" VerticalAlignment="Top" Text="Diffuse Light" Style="{StaticResource PhoneTextLargeStyle}" /&gt; &lt;Slider Grid.Column="1" Grid.Row="1" Name="DiffuseLightSlider" Minimum="0.0" Maximum="2.0" Value="1.0" ValueChanged="DiffuseLightSlider_OnValueChanged" /&gt; &lt;TextBlock Grid.Column="0" Grid.Row="2" VerticalAlignment="Top" Text="Specular Light" Style="{StaticResource PhoneTextLargeStyle}" /&gt; &lt;Slider Grid.Column="1" Grid.Row="2" Name="SpecularLightSlider" Minimum="0.0" Maximum="2.0" Value="1.0" ValueChanged="SpecularLightSlider_OnValueChanged" /&gt; &lt;/Grid&gt; &lt;/ScrollViewer&gt; &lt;/Grid&gt; &lt;phone:PhoneApplicationPage.ApplicationBar&gt; &lt;shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0"&gt; &lt;shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Center.png" Text="Center" Click="Center_Click" /&gt; &lt;shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Wireframe.png" Text="Wireframe" Click="Rasterizer_Click" /&gt; &lt;shell:ApplicationBarIconButton IconUri="/Toolkit.Content/ApplicationBar.Center.png" Text="Light" Click="Light_Click" /&gt; &lt;/shell:ApplicationBar&gt; &lt;/phone:PhoneApplicationPage.ApplicationBar&gt; </code></pre> <p>Since you ask for the application bar to be transparent the UI element(s), in your case the <code>ScrollViewer</code>, knows that the end of the page is actually where the application bar ends. So by adding 70 margin from bottom: <code>Margin="0,0,0,70"</code> would fix the "on top" problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload