0

でかなり変わった効果に出くわしwindows phone keypadましたportrait mode。に がありtextboxbottom of my gridその下に がありapp barます。テキスト ボックスにフォーカスが移ると、 の間に不要なスペースができtextbox and the keypadます。この写真で指摘した

ここに画像の説明を入力.

また、ここに私のコードがあります、

   <Grid x:Name="LayoutRoot" Background="Green">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
        <TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
        <TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
    </StackPanel>

    <!--ContentPanel - place additional content here-->
    <Grid Background="PeachPuff" x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*" MaxHeight="100"/>
        </Grid.RowDefinitions>
        <ScrollViewer x:Name="scrollthis">
            <StackPanel x:Name="mystack"/>
        </ScrollViewer>
        <TextBox InputScope="Search" Grid.Row="1" x:Name="myTextBox"/>
    </Grid>

    <!--Uncomment to see an alignment grid to help ensure your controls are
        aligned on common boundaries.  The image has a top margin of -32px to
        account for the System Tray. Set this to 0 (or remove the margin altogether)
        if the System Tray is hidden.

        Before shipping remove this XAML and the image itself.-->
    <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
</Grid>
<phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
        <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="enter text" Click="ApplicationBarIconButton_Click_1"/>
    </shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

アプリバーをクリックして、次のことを行います。

    private void ApplicationBarIconButton_Click_1(object sender, EventArgs e)
    {
        TextBlock text = new TextBlock() { Text = myTextBox.Text, Margin = new Thickness(0,0,0,5) };
        myTextBox.Text = "";
        mystack.Children.Add(text);
    }

これが OS のバグである場合、ハックを探す必要がありますか?Also please note that this spacing is not there in the landscape mode.

アップデート

app barポートレートモードで下部にがある場合にのみ発生することがわかりました。

アップデート

また、最初はグリッドの余白を処理しても、テキストを入力した後、間隔が広がり始めることに気付きました。

4

2 に答える 2

0

これは、GDR 3 Update で修正されたバグです。

于 2014-04-04T09:55:55.707 に答える