Skip to content

文本输入框

文本输入框 (TextBox)

xml
<TextBox Width="328" PlaceholderText="请输入文本"/>

带清空按钮的文本输入框

xml
<TextBox Width="328" PlaceholderText="请输入文本" Classes="Clear"/>

密码输入框

xml
<TextBox
    Width="328"
    Classes="Password"
    PasswordChar="*"
    PlaceholderText="请输入密码"/>

搜索输入框 (SearchTextBox)

  • IsReturnSearchTrue时,按下Enter键会触发搜索操作 SearchCommand, OnSearchTriggered, 接受的参数为搜索的文本 也可以点击搜索图标触发搜索操作
xml
<ui:SearchTextBox
    Width="328"
    IsReturnSearch="True"
    PlaceholderText="请输入要搜索的文本"/>

带标签的输入框

  • 可通过设置 PrefixSuffix 来指定前后标签
xml
<ui:LabelTextBox
  Width="328"
  PlaceholderText="请输入网址"
  Prefix="https://"
  Suffix=".com" />

基于 MIT 许可发布