【问题标题】:Which TextBox and PasswordBox controls arre these?这些是哪些 TextBox 和 Password xBox 控件?
【发布时间】:2014-07-26 12:13:40
【问题描述】:

我正在寻找适用于 Windows Phone 的 Uber 应用程序。他们的注册屏幕如下所示。

这些是哪些控件?有谁知道。

【问题讨论】:

  • 文本框可以是工具包的PhoneTextBox。虽然看起来不像。

标签: windows-phone-8 textbox passwordbox


【解决方案1】:

我不确切知道他们在使用什么,但您可以使用 Windows Phone 工具包和一些简单的 XAML 重新创建它。

对于文本框

<StackPanel Orientation="Horizontal" Height="60" Background="White" Margin="10,0" >
    <TextBlock Text="your_text" VerticalAlignment="Center" Foreground="Black" />
    <toolkit:PhoneTextBox Hint="your hint" ActionIcon="/Assets/your_image.png"
                          Background="#00000000" BorderThickness="0"/>
</StackPanel>

密码框

<StackPanel Orientation="Horizontal" Height="70" Background="White" Margin="10,0" >
    <TextBlock Text="your_text" VerticalAlignment="Center" Foreground="Black" />
   <PasswordBox Password="test_password"/>
    <Image Source="/Assets/your_image.png"></Image>
</StackPanel>

【讨论】:

  • 但这并没有在 PasswordBox 中添加提示。此外,该图像看起来像是密码控件的一部分,例如 PhoneTextBox 的操作图标
  • 如果您还想要密码框的提示,我认为解决方案是让 覆盖密码框。我很确定不久前有解决堆栈溢出问题的方法。大多数这些自定义控件仅依赖于元素 + 样式的巧妙定位。
  • 是的,我见过那些带有文本框覆盖的解决方案。届时将尝试。谢谢。
猜你喜欢
  • 2011-06-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-05-14
  • 2017-03-10
  • 1970-01-01
  • 2016-07-23
  • 1970-01-01
相关资源
最近更新 更多