Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows Phone appBar adding extra margin above keyboard
    primarykey
    data
    text
    <p>I am trying to create a messaging screen. This is my XAML:</p> <pre><code>&lt;phone:PhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:edc="clr-namespace:Microsoft.Expression.Controls;assembly=Microsoft.Expression.Drawing" xmlns:em="clr-namespace:Microsoft.Expression.Media;assembly=Microsoft.Expression.Drawing" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696" x:Class="chatScreen.MainPage" Orientation="Portrait" shell:SystemTray.IsVisible="True"&gt; &lt;phone:PhoneApplicationPage.Resources&gt;&lt;/phone:PhoneApplicationPage.Resources&gt; &lt;phone:PhoneApplicationPage.ApplicationBar&gt; &lt;shell:ApplicationBar&gt; &lt;shell:ApplicationBarIconButton IconUri="/icons/appbar.message.send.png" IsEnabled="True" Text="send"/&gt; &lt;/phone:PhoneApplicationPage.ApplicationBar&gt; &lt;!--LayoutRoot is the root grid where all page content is placed--&gt; &lt;Grid x:Name="LayoutRoot" Background="Transparent"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="*"/&gt; &lt;RowDefinition Height="auto"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid x:Name="userInfo" Grid.Row="0" Margin="12,0,0,0"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="15" /&gt; &lt;ColumnDefinition Width="84" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;ColumnDefinition Width="48"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Image x:Name="PresenceIcon" Grid.Column="0" Height="64" Width="12" HorizontalAlignment="Left" VerticalAlignment="Bottom" Source="available.jpg" /&gt; &lt;Image x:Name="DisplayImage" Grid.Column="1" Height="64" Width="64" HorizontalAlignment="Left" VerticalAlignment="Bottom" Source="tony.jpg" Margin="0" /&gt; &lt;Grid x:Name="metaContact_info" Grid.Column="2"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="*"/&gt; &lt;RowDefinition Height="*" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;TextBlock x:Name="DisplayName" Grid.Row="0" Text="Tony Stark" TextWrapping="NoWrap" FontSize="40" /&gt; &lt;TextBlock x:Name="DisplayStatus" Grid.Row="1" Text="enjoying windows phone" FontSize="18" TextTrimming="WordEllipsis" /&gt; &lt;/Grid&gt; &lt;Image x:Name="ServiceIcon" Grid.ColumnSpan="2" Grid.Column="3" Source="service_gtalk.jpg" Width="24" Height="24" VerticalAlignment="Top" Margin="0,20,0,0"/&gt; &lt;/Grid&gt;&lt;!-- userInfo ends --&gt; &lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,18,12,12"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="auto" /&gt; &lt;RowDefinition Height="*"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;ScrollViewer x:Name="messages" Grid.Row="0" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="0"/&gt; &lt;/Grid&gt; &lt;ScrollViewer x:Name="inputBox_scroller" Grid.Row="2" Margin="0" MaxHeight="108" VerticalAlignment="Bottom"&gt; &lt;TextBox x:Name="inputBox" TextWrapping="Wrap" HorizontalContentAlignment="Stretch" Text="" FontSize="{StaticResource PhoneFontSizeMedium}" InputScope="Chat" AcceptsReturn="True" /&gt; &lt;/ScrollViewer&gt;&lt;!-- Content Panel ends --&gt; </code></pre> <p> </p> <p>I am also using Jeff Wilcox's PhoneThemeManager 1.2 to make my app always load in light theme. </p> <p>When I have appBar in this screen and the keyboard opens, there is extra margin of about 48 px below the textBox. When the phone theme is black, this shows an ugly black bar above the keyboard and below the textBox. When the phone theme is white, this black color bar is in white color. Here are screenshots to better demonstrate:</p> <p><img src="https://i.stack.imgur.com/LZbs4.png" alt=""> <img src="https://i.stack.imgur.com/8rFRH.png" alt=""></p> <p>However, when I disable the appbar and then open the keyboard, this extra margin below the textBox is not there. </p> <p>I want to disable this extra margin when keyboard is open just like how it happens in messaging hub where appBar is there, along with auto correct bar of keyboard and still this extra margin isn't there.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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