最近在做一个UWP项目,登录的用户和密码框需要圆角的,由于UWP的TextBlock 和PasswordBox是没有CornerRadius属性的,于是我就使用了一个Border嵌套在最外层,设置其他CornerRadius="20"

实现代码如下:

                       <!--账号-->
<Border Background="#FFFFFF" CornerRadius="">
<RelativePanel Margin="10,0,0,0" Padding="">
<TextBlock x:Name="tbNumber" Text="账号:" RelativePanel.AlignVerticalCenterWithPanel="True" />
<TextBox x:Name="txtUserName" FontSize="" RelativePanel.RightOf="tbNumber" PlaceholderText="请输入GW号/手机号"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignHorizontalCenterWithPanel="True"
RelativePanel.AlignVerticalCenterWithPanel="True"
Margin="0,5,0,0"
BorderThickness=""
InputScope="NameOrPhoneNumber"/>
</RelativePanel>
</Border>
<!--密码-->
<Border Background="#FFFFFF" CornerRadius="" Margin="0,20,0,0">
<RelativePanel Margin="10,0,0,0" Padding="">
<TextBlock x:Name="tbPwd" Text="密码:" RelativePanel.AlignVerticalCenterWithPanel="True" />
<PasswordBox x:Name="txtPwd" RelativePanel.RightOf="tbPwd" PlaceholderText="请输入密码"
RelativePanel.AlignRightWithPanel="True" IsEnabled="True"
BorderThickness=""
RelativePanel.AlignHorizontalCenterWithPanel="True"
RelativePanel.AlignVerticalCenterWithPanel="True"
Margin="0,5,0,0"/>
</RelativePanel>
</Border>

效果图如下:

UWP小白一个,欢迎指教!!

最新文章

  1. Dojo: Quick Start
  2. [原创]cocos2d-x研习录-第三阶 背景音乐和音效
  3. Linux 网络编程(UDP)
  4. [转]nodejs npm常用命令
  5. CMake入门以及学习笔记
  6. 2014年国人开发的最热门的开源软件TOP 100
  7. JS练习题1共7题
  8. 安装多JDK后,java编译环境和运行环境版本(JDK版本) 不一致解决:
  9. Add mappings to an Elasticsearch index in realtime
  10. Activity的窗口对象(Window)的创建过程分析
  11. C++初始化列表问题
  12. 1203.2——条件语句 之 switch语句
  13. windows下安装testlink
  14. JSP内置对象--pageContext对象(非常重要!!!)
  15. 设计模式的征途—2.简单工厂(Simple Factory)模式
  16. Array类的Sort()方法
  17. js中定义对象的几种方式
  18. IPFS: BitSwap协议(数据块交换)
  19. 【转】使用ffmpeg转码的MP4文件需要加载完了才能播放的解决办法
  20. 错误RuntimeError: Invalid DISPLAY variable

热门文章

  1. (翻译)2016美国数学建模MCM E题(环境)翻译:我们朝向一个干旱的星球?
  2. Android在网络上分析获取图片(支持bmp格式)
  3. expdp备份速度慢的问题
  4. Android Studio ERROR: x86 emulation currently requires hardware acceleration!报错解决傻瓜教程~
  5. Codeforces 385 D Bear and Floodlight
  6. 分布式缓存技术PK:选择Redis还是Memcached?
  7. zabbix从听说到学会
  8. build-qt.sh(Cross compile in Linux for Windows)
  9. maven_默认新建项目jdk1.6_默认配置
  10. DataGrid自定义复选框