2012-07-10 47 views
0

我有一些控制,我設置tabindex爲我想停止的控件。我使用模擬器來測試它。在鍵盤上輸入確認按鈕後,光標停留在文本框上。有人會告訴我的鏈接或代碼,使其工作?提前致謝。TabIndex似乎不適用於windows2010的vs2010表達式

下面是我的控件代碼:

<TextBox x:Name="txtUser" Grid.Row="1" Grid.Column="2" IsTabStop="True" TabIndex="1" Style="{StaticResource txtStyle_24}" FontSize="32" /> 
<TextBlock x:Name="Password" Text="Password :" Grid.Row="2" Grid.Column="1" Style="{StaticResource LabelStyle_24}" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="32" Foreground="{StaticResource PhoneAccentBrush}" /> 
    <PasswordBox x:Name="psd" PasswordChar="*" Grid.Row="2" Grid.Column="2" IsTabStop="True" 
        TabIndex="2" Style="{StaticResource PasswordBoxStyle_24}" FontSize="32"/> 

回答

1

TabIndex如果你想將焦點移動到下一個TextBox,訂閱KeyUp事件,並檢查e.Key == Keys.Enter沒有意義的Windows Phone

。比移動重點與textBox.Focus()

我看到此行爲,但現在找不到鏈接