Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在windows phone中弹出键盘时启用滚动?_C#_Xaml_Windows Phone - Fatal编程技术网

C# 如何在windows phone中弹出键盘时启用滚动?

C# 如何在windows phone中弹出键盘时启用滚动?,c#,xaml,windows-phone,C#,Xaml,Windows Phone,在我的应用程序中,我想在软键盘弹出时启用滚动! 我尝试在文本框\u GotFocus事件中更改滚动查看器的高度 这是xaml代码 <Grid x:Name="ContentPanel" Margin="0,152,24,21"> <ScrollViewer x:Name="ScrollViwer" VerticalScrollBarVisibility="Auto" Height="560"> <Grid>

在我的应用程序中,我想在软键盘弹出时启用滚动! 我尝试在文本框\u GotFocus事件中更改滚动查看器的高度

这是xaml代码

 <Grid x:Name="ContentPanel" Margin="0,152,24,21">
        <ScrollViewer x:Name="ScrollViwer" VerticalScrollBarVisibility="Auto" Height="560">
            <Grid>
                <TextBlock HorizontalAlignment="Left" Height="65" Margin="18,10,0,0" TextWrapping="Wrap" Text="Code" VerticalAlignment="Top" Width="180" FontSize="20"/>
                <TextBlock HorizontalAlignment="Left" Height="65" Margin="18,113,0,0" TextWrapping="Wrap" Text="Symbol" VerticalAlignment="Top" Width="180" FontSize="20"/>
                <TextBlock HorizontalAlignment="Left" Height="65" Margin="18,221,0,0" TextWrapping="Wrap" Text="Decimal" VerticalAlignment="Top" Width="180" FontSize="20"/>
                <TextBlock HorizontalAlignment="Left" Height="65" Margin="18,335,0,0" TextWrapping="Wrap" Text="Format" VerticalAlignment="Top" Width="188" FontSize="20"/>
                <TextBox x:Name="CodeTextBox" Tap="CodeTextBox_Tap_1" BorderThickness="1" HorizontalAlignment="Left" Height="77" Margin="8,36,0,0" Background="Transparent" TextWrapping="Wrap" VerticalAlignment="Top" Width="438"/>
                <TextBox x:Name="SymbolTextBox" BorderThickness="1" GotFocus="TextBox_GotFocus" HorizontalAlignment="Left" KeyDown="Symbol_KeyDown" TextChanged="SymbolText_Changed_1" Height="77" Margin="8,144,0,0" TextWrapping="Wrap" Background="Transparent" VerticalAlignment="Top" Width="438"/>

                <Border Background="Transparent" HorizontalAlignment="Left" BorderBrush="#c5c5c5" BorderThickness="1" Height="59" Margin="18,257,0,0" VerticalAlignment="Top" Width="414">
                    <TextBlock x:Name="DecimalTextBox"  Foreground="Black" HorizontalAlignment="Left" Tap="DeacimalTextBox_Tap_1" Height="77" Margin="5,10,0,-28" TextWrapping="Wrap" VerticalAlignment="Top" Width="409" FontSize="24"/>
                </Border>
                <Border Background="Transparent" BorderBrush="#c5c5c5" BorderThickness="1" HorizontalAlignment="Left" Height="59" Margin="18,372,0,0" VerticalAlignment="Top" Width="414">
                    <TextBlock x:Name="FormatTextBox"  Foreground="Black" Tap="FormatTextBox_Tap_1" HorizontalAlignment="Left" Height="77" Margin="5,10,0,-28" TextWrapping="Wrap" VerticalAlignment="Top" Width="409" FontSize="24"/>
                </Border>
            </Grid>
        </ScrollViewer>
        <ListBox x:Name="DecimalPlacesListBox" Background="#cccccc" Visibility="Collapsed" SelectionChanged="DecimalPlaces_SelectionChanged" HorizontalAlignment="Left" Height="140" Margin="18,316,0,0" VerticalAlignment="Top" Width="414">            
    </Grid>
</Grid> 

但它一文不值。
如何在键盘弹出时启用滚动

我试图更改滚动查看器的宽度?-您正在尝试创建水平滚动吗


如果垂直-在scrollviewer中更改子项的大小,而不是scrollviewer

您可以发布相关页面的XAML吗?Sry这是一个键入错误!!在你的回答中,你的意思是改变网格的高度吗?