Size app with taskbar

104 Views Asked by At

I created a new UWP app (target version 10.0 build 14393; min. version 10.0 build 10586) in vs. I then changed the xaml for the main page to add two text boxes. As you can see from the image below, this resulted in the bottom textbox being partly obscured by the phone emulator's taskbar.

My intuition says that the sensible thing to do would be to size the app such that its content window does not intersect with the taskbar. How can I do that?

I'm not real familiar with Windows Phone and am open to other suggestions.

<Page
    x:Class="HelloWorld.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:HelloWorld"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <TextBox Text="Hello"></TextBox>
    <TextBox Text="World" FontSize="30" VerticalAlignment="Bottom"></TextBox>
    </Grid>
</Page>

Here is the result in the phone emulator: (Mobile emulator 10.0.14393.0 WVGA 4 inch 512MB)

enter image description here

1

There are 1 best solutions below

0
On

A lot of googling finally turned up the following. I do it right after activating my Window.

      ApplicationView.GetForCurrentView().FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Minimal;

It actually doesn't fix the toy example above, but it does fix my real app. So it can't be the whole story. But it's a start for anyone who runs into this problem in the future.