打开键盘时,Windows Phone 8中的Scrollviewr问题? [英] Scrollviewr problem in windows phone 8 when keypad is opened?

查看:56
本文介绍了打开键盘时,Windows Phone 8中的Scrollviewr问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在视图中使用滚动查看器.这是我的代码

I am using scroll viewer in my view..here is my code

< ScrollViewer>
        < Grid x:Name =" LayoutRoot"背景=透明".身高="870">
            < Grid.ColumnDefinitions>
                < ColumnDefinition/>
                < ColumnDefinition Width ="19 *"/>
            </Grid.ColumnDefinitions>
            < Grid.RowDefinitions>
                < RowDefinition Height ="302"/>
                < RowDefinition/>
            </Grid.RowDefinitions>

            <!-TitlePanel包含应用程序的名称和页面标题->
            < StackPanel Grid.Row ="0";保证金="12、17、0、5". Grid.ColumnSpan ="2">
                < TextBlock Text ="{Binding LocalizedAppResources.EditProfilePageTitle,Mode =单向,Source = {StaticResource LocalizedStrings}}"" Style ="{StaticResource PhoneTextNormalStyle}"保证金="13,0,11,0&" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize =" {StaticResource PhoneFontSizeMedium}"/>
            </StackPanel>
            < Image Horizo​​ntalAlignment =左"
                    Height ="183"
                    VerticalAlignment =顶部"
                    Width ="180"
                    Margin =" 6,79,0,0"
                    RenderTransformOrigin ="0.538,1.072"
                    Grid.Column ="1"
                    Source =" {Binding ContactProfile.ImageUrl}"
                   />

            <!-ContentPanel-在此处放置其他内容->
            < Grid x:Name =" ContentPanel" Grid.Row ="1".保证金="12,0,12,0&" Grid.ColumnSpan ="2">

            </Grid>

            < Grid Grid.ColumnSpan ="2"; Horizo​​ntalAlignment =左"高度="560".保证金="0,10,0,-22". Grid.Row ="1". VerticalAlignment =顶部"宽度="480">
                < Grid.RowDefinitions>
                    < RowDefinition Height =" 107 *"/>
                    < RowDefinition Height =" 107 *"/>
                    < RowDefinition Height =" 107 *"/>
                    < RowDefinition Height =" 107 *"/>
                    < RowDefinition Height =" 107 *"/>

                </Grid.RowDefinitions>
                < telerikPrimitives:RadTextBox
                                Horizo​​ntalAlignment =左"
    Height ="107"保证金="13,-16,0,0&" 
VerticalAlignment ="顶部"
Width ="460" 
                               文字="{{Binding Path = ContactProfile.FirstName}""
Header =" {Binding Path = ContactsAndFriendsResources.FirstNameLabelText,Source = {StaticResource LocalizedStrings}}' 
infrastructureUI:RadTextBoxBehavior.ValidationState =" {Binding Path = ContactProfile.FirstNameValidationInfo,UpdateSourceTrigger = Default,Mode = TwoWay}"
                                ActionButtonCommandParameter =名字"
                                InfrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText ="True"
                                InfrastructureUI:RadTextBoxBehavior.UpdateSourceText =" {Binding Path = ContactProfile.FirstName,Mode = TwoWay}"/>
                < telerikPrimitives:RadTextBox Horizo​​ntalAlignment =左" 
  Height ="107"
&margin ="13,92,0,0&";
  VerticalAlignment ='"Top" 
  Width ="460"
                                         文字="{{Binding Path = ContactProfile.LastName}""    
  Header =" {Binding Path = ContactsAndFriendsResources.LastNameLabelText,Source = {StaticResource LocalizedStrings}}"<
  Grid.RowSpan ="2"
                                          ActionButtonCommandParameter =姓氏""
                                          InfrastructureUI:RadTextBoxBehavior.ValidationState =" {Binding Path = ContactProfile.LastNameValidationInfo, UpdateSourceTrigger =默认,模式= TwoWay}"
                                          InfrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText ="True"
                                          InfrastructureUI:RadTextBoxBehavior.UpdateSourceText =" {Binding Path = ContactProfile.LastName,Mode = TwoWay}"
                                              />
                < telerikPrimitives:RadTextBox Horizo​​ntalAlignment =左" 
  Height ="107" 
&margin =" 12,99,0,0"<
  Grid.Row ="1" 
  VerticalAlignment ='"Top" 
  Width ="460"
                                         文字="{{Binding Path = ContactProfile.ContactNumber}""
  Header =" {Binding Path = ContactsAndFriendsResources.PhoneNumberLabelText,Source = {StaticResource LocalizedStrings}}"<
  Grid.RowSpan ="2"
                                          InfrastructureUI:RadTextBoxBehavior.ValidationState =" {Binding Path = ContactProfile.ContactNumberValidationInfo, UpdateSourceTrigger =默认,模式= TwoWay}"
                                          InfrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText ="True"
                                          InfrastructureUI:RadTextBoxBehavior.UpdateSourceText =" {Binding Path = ContactProfile.ContactNumber,Mode = TwoWay}"
                                              />
                < telerikPrimitives:RadTextBox Horizo​​ntalAlignment =左" 
  Height ="107" 
&margin ="13,96,0,0&";
  Grid.Row ="2" 
  VerticalAlignment ='"Top" 
  Width ="460"
                                         文本="{{Binding Path = ContactProfile.EmailID}""
  Header =" {Binding Path = ContactsAndFriendsResources.EmailAdressLabelText,Source = {StaticResource LocalizedStrings}}"<
  Grid.RowSpan ="2"
                                          InfrastructureUI:RadTextBoxBehavior.ValidationState =" {Binding Path = ContactProfile.EmailIDValidationInfo, UpdateSourceTrigger =默认,模式= TwoWay}"
                                          InfrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText ="True"
                                          InfrastructureUI:RadTextBoxBehavior.UpdateSourceText =" {Binding Path = ContactProfile.EmailID,Mode = TwoWay}"
                                              />
                <!-< telerikPrimitives:RadTextBox Horizo​​ntalAlignment ="Left" 
  Height ="107" 
&margin =="13,93,0,0&" 
  Grid.Row ="3" 
  VerticalAlignment ='"Top" 
  Width ="460" 
                                         文字="{{Binding Path = ContactProfile.Location}""
  Header =" {Binding Path = ContactsAndFriendsResources.EditLocationLabelText,Source = {StaticResource LocalizedStrings}}"<
  Grid.RowSpan ="2"/>->

                < Button 
                    Content ="{Binding Path = ContactProfile.Location,Mode = TwoWay}"
                   身高="73"
                   宽度="460"
                   保证金="13,5,0,0&";
                    Grid.Row ="4" 
                    VerticalAlignment =顶部"
                    Horizo​​ntalAlignment =左"
                   背景=#bebebe"
                    BorderThickness ="1"
                    BorderBrush =#8f8f8f"
                    FlowDirection ="LeftToRight"
                    Horizo​​ntalContentAlignment =左"
                   前景=#FF040000"
                    Command =" {Binding OpenMapsCommand}"
                    />
            </Grid>

        </Grid>
    </ScrollViewer>

<ScrollViewer>
        <Grid x:Name="LayoutRoot" Background="Transparent" Height="870">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="19*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="302"/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <!--TitlePanel contains the name of the application and page title-->
            <StackPanel Grid.Row="0" Margin="12,17,0,5" Grid.ColumnSpan="2">
                <TextBlock Text="{Binding LocalizedAppResources.EditProfilePageTitle, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}" Margin="13,0,11,0" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeMedium}"/>
            </StackPanel>
            <Image HorizontalAlignment="Left"
                   Height="183"
                   VerticalAlignment="Top"
                   Width="180"
                   Margin="6,79,0,0"
                   RenderTransformOrigin="0.538,1.072"
                   Grid.Column="1"
                   Source="{Binding ContactProfile.ImageUrl}"
                   />

            <!--ContentPanel - place additional content here-->
            <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Grid.ColumnSpan="2">

            </Grid>

            <Grid Grid.ColumnSpan="2" HorizontalAlignment="Left" Height="560" Margin="0,10,0,-22" Grid.Row="1" VerticalAlignment="Top" Width="480">
                <Grid.RowDefinitions>
                    <RowDefinition Height="107*"/>
                    <RowDefinition Height="107*"/>
                    <RowDefinition Height="107*"/>
                    <RowDefinition Height="107*"/>
                    <RowDefinition Height="107*"/>

                </Grid.RowDefinitions>
                <telerikPrimitives:RadTextBox
                                HorizontalAlignment="Left" 
   Height="107" Margin="13,-16,0,0" 
VerticalAlignment="Top" 
Width="460" 
                                Text="{Binding Path=ContactProfile.FirstName}"
Header="{Binding Path=ContactsAndFriendsResources.FirstNameLabelText, Source={StaticResource LocalizedStrings}}" 
infrastructureUI:RadTextBoxBehavior.ValidationState="{Binding Path=ContactProfile.FirstNameValidationInfo, UpdateSourceTrigger=Default, Mode=TwoWay}"
                                ActionButtonCommandParameter="First name"
                                infrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText="True"
                                infrastructureUI:RadTextBoxBehavior.UpdateSourceText="{Binding Path=ContactProfile.FirstName, Mode=TwoWay}"/>
                <telerikPrimitives:RadTextBox HorizontalAlignment="Left" 
 Height="107"
 Margin="13,92,0,0" 
 VerticalAlignment="Top" 
 Width="460"
                                          Text="{Binding Path=ContactProfile.LastName}"    
 Header="{Binding Path=ContactsAndFriendsResources.LastNameLabelText, Source={StaticResource LocalizedStrings}}" 
 Grid.RowSpan="2"
                                          ActionButtonCommandParameter="LastName"
                                          infrastructureUI:RadTextBoxBehavior.ValidationState="{Binding Path=ContactProfile.LastNameValidationInfo, UpdateSourceTrigger=Default, Mode=TwoWay}"
                                          infrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText="True"
                                          infrastructureUI:RadTextBoxBehavior.UpdateSourceText="{Binding Path=ContactProfile.LastName, Mode=TwoWay}"
                                              />
                <telerikPrimitives:RadTextBox HorizontalAlignment="Left" 
 Height="107" 
 Margin="12,99,0,0" 
 Grid.Row="1" 
 VerticalAlignment="Top" 
 Width="460"
                                          Text="{Binding Path=ContactProfile.ContactNumber}" 
 Header="{Binding Path=ContactsAndFriendsResources.PhoneNumberLabelText, Source={StaticResource LocalizedStrings}}" 
 Grid.RowSpan="2"
                                          infrastructureUI:RadTextBoxBehavior.ValidationState="{Binding Path=ContactProfile.ContactNumberValidationInfo, UpdateSourceTrigger=Default, Mode=TwoWay}"
                                          infrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText="True"
                                          infrastructureUI:RadTextBoxBehavior.UpdateSourceText="{Binding Path=ContactProfile.ContactNumber, Mode=TwoWay}"
                                              />
                <telerikPrimitives:RadTextBox HorizontalAlignment="Left" 
 Height="107" 
 Margin="13,96,0,0" 
 Grid.Row="2" 
 VerticalAlignment="Top" 
 Width="460"
                                          Text="{Binding Path=ContactProfile.EmailID}" 
 Header="{Binding Path=ContactsAndFriendsResources.EmailAdressLabelText, Source={StaticResource LocalizedStrings}}" 
 Grid.RowSpan="2"
                                          infrastructureUI:RadTextBoxBehavior.ValidationState="{Binding Path=ContactProfile.EmailIDValidationInfo, UpdateSourceTrigger=Default, Mode=TwoWay}"
                                          infrastructureUI:RadTextBoxBehavior.IsEnabledUpdateSourceText="True"
                                          infrastructureUI:RadTextBoxBehavior.UpdateSourceText="{Binding Path=ContactProfile.EmailID, Mode=TwoWay}"
                                              />
                <!--<telerikPrimitives:RadTextBox HorizontalAlignment="Left" 
 Height="107" 
 Margin="13,93,0,0" 
 Grid.Row="3" 
 VerticalAlignment="Top" 
 Width="460" 
                                          Text="{Binding Path=ContactProfile.Location}"
 Header="{Binding Path=ContactsAndFriendsResources.EditLocationLabelText, Source={StaticResource LocalizedStrings}}" 
 Grid.RowSpan="2"/>-->

                <Button 
                    Content="{Binding Path=ContactProfile.Location, Mode=TwoWay}"
                    Height="73" 
                    Width="460"
                    Margin="13,5,0,0"
                    Grid.Row="4" 
                    VerticalAlignment="Top"
                    HorizontalAlignment="Left"
                    Background="#bebebe"
                    BorderThickness="1"
                    BorderBrush="#8f8f8f"
                    FlowDirection="LeftToRight"
                    HorizontalContentAlignment="Left"
                    Foreground="#FF040000"
                    Command="{Binding OpenMapsCommand}"
                    />
            </Grid>

        </Grid>
    </ScrollViewer>

当我单击文本框小键盘时,..然后,当我想向下滚动到另一个文本框时,cro音不起作用..这意味着,如果打开了键盘,则滚动不起作用..

when i click on textbox keypad is opened..then when i want to scroll down to another textbox scrooling is not working..that means,if keypad is opened scrolling is not working..

打开键盘时如何滚动?

推荐答案

我认为这是正常的行为.键盘(SIP)是模式对话框".表示它将接收所有输入焦点,直到通过焦点更改或用户按返回键将其取消.

I believe that is the normal behavior. The Keypad (SIP) is a "modal dialog" meaning it receives all input focus until it is dismissed via a change in focus or user pressing the back key.

希望这会有所帮助,
标记

Hope this helps,
Mark


这篇关于打开键盘时,Windows Phone 8中的Scrollviewr问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆