Windows Phone Inputscope - 当用户在TextBox上时,无法看到Passwordbox

时间:2014-10-21 06:50:22

标签: c# xaml windows-phone

我在StackPanel中有Textbox和Passwordbox。当我在文本框中输入时,我看不到整个PasswordBox(只是其高度的1/3),因此用户很难从Textbox更改为Passwordbox。当我在PasswordBox中输入时,我正确地看到了Textbox和Passwordbox。

我如何解决这个问题?

 <Grid x:Name="ContentPanel">
                <StackPanel Orientation="Vertical" VerticalAlignment="Top" Margin="50,0">
                    <Grid Height="72" Margin="0,0,5,5" Background="White">
                        <Controls:WatermarkTextBox WatermarkText="{Binding LocalizedResources.LoginWatermark, Source={StaticResource LocalizedStrings}}"
                            x:Name="LoginEmail" InputScope="EmailUserName" BorderThickness="3" Foreground="#DE000000" FocusedForeground="#DE000000" BorderBrush="White" Background="#A5FFFFFF" CaretBrush="White"/>
                    </Grid>
                    <Grid Height="72" Margin="0,5,5,0" Background="White">
                        <Controls:WatermarkPasswordBox x:Name="LoginPassword" WatermarkText="{Binding LocalizedResources.PasswordWatermark, Source={StaticResource LocalizedStrings}}"
                            Password="" Foreground="#DE000000" FocusedForeground="#DE000000" Background="#A7FFFFFF" BorderBrush="White" SelectionForeground="White" />
                    </Grid>
                </StackPanel>
            </Grid>

1 个答案:

答案 0 :(得分:0)

我测试了你的代码,对我来说很好用!你可以发布整个XAML源代码吗? ContentPanel是可视树的根元素还是在其他容器中?您是否还可以指定是否使用第三方库? (特别是那些水印控件)