当前位置: 首页 > news >正文

鞍山网站制作小程序重庆网站备案必须到核验点

鞍山网站制作小程序,重庆网站备案必须到核验点,商城网站建设明细,网站做端口是什么问题实现步骤 实现左右布局 使用了Grid两列的网格布局&#xff0c;第一列宽度占35%&#xff0c;第二列宽度占65%。使用容器布局Border包裹左右布局内容&#xff0c;设置背景色、设置圆角 <!-- 定义两列--> <Grid.ColumnDefinitions><ColumnDefinition Width &quo…

 

实现步骤

实现左右布局

  • 使用了Grid两列的网格布局,第一列宽度占35%,第二列宽度占65%。
  • 使用容器布局Border包裹左右布局内容,设置背景色、设置圆角
<!-- 定义两列-->
<Grid.ColumnDefinitions><ColumnDefinition Width ="0.35*"></ColumnDefinition><ColumnDefinition Width ="0.65*"></ColumnDefinition></Grid.ColumnDefinitions><!-- 左侧布局具体实现-->
<Border Grid.Column="0" CornerRadius="10,0,0,10"><Border.Background><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><GradientStop Color="#00999A" Offset="0"/><GradientStop Color="#0072c0" Offset="1"/></LinearGradientBrush></Border.Background>
</Border>
<!-- 右侧布局具体实现--><Border Grid.Column="1" CornerRadius="0,10,10,0" Background="WhiteSmoke"></Border>

编写左侧布局

Grid.Column="1" 这一行代码的作用是将一个 Border 控件放置在 Grid 的第一列

Border中的CornerRadius圆角元素和Margin外边距元素的值的顺序,左,上,右,下

 <StackPanel Grid.Column="0"><TextBlock Margin="0,100,0,0" Text="bilibili" Foreground="White"FontSize="40" HorizontalAlignment="Center" FontWeight="Bold"/><TextBlock Margin="20,5,20,0"Text="Welcome to the bilibili. You can register by clicking the  button below"TextWrapping="WrapWithOverflow" Foreground="White" LineHeight="25"/><Button Margin="0,80,0,0" Content="Sign Up" Foreground ="White"Background="Transparent" BorderBrush="White" Width="200"/></StackPanel>

编写右侧布局

<!-- 右侧布局 --><Border Grid.Column="1" CornerRadius="0,10,10,0" Background="WhiteSmoke"> <!-- 圆角边框,浅灰色背景 --><StackPanel Margin="20"> <!-- 内容面板,包含登录表单和其他UI元素 --><!-- 登录提示 --><TextBlock Text="Sign in to bilibili" Foreground="#0072c0" FontSize="30" HorizontalAlignment="Center" Margin="0,0,0,25" FontWeight="bold"/> <!-- 社交媒体登录按钮 --><StackPanel Orientation="Horizontal" HorizontalAlignment="Center"><Button Background="Transparent" BorderBrush="Transparent"><Image Source="Images\wechat.png" Width="40" Height="40"/></Button><Button Background="Transparent" BorderBrush="Transparent"><Image Source="Images\weibo.png" Width="40" Height="40" Margin="5,0,5,0"/></Button><Button Background="Transparent" BorderBrush="Transparent"><Image Source="Images\qq.png" Width="40" Height="40"/></Button></StackPanel><!-- 提示使用账户信息登录 --><TextBlock Margin="0,15,0,0" Text="or use your account info" TextAlignment="Center" FontFamily="Arial" FontSize="14" Foreground="#878787"/><!-- 用户名输入框 --><Border Margin="0,30,0,0" Height="35" Width="340" BorderBrush="#878787" BorderThickness="1" CornerRadius="20"><StackPanel Orientation="Horizontal"><!-- 绘制原型图像 --><Ellipse Width="25" Height="25" Margin="5,0,0,0"><Ellipse.Fill><ImageBrush ImageSource="Images\user.png"/></Ellipse.Fill></Ellipse><TextBlock Margin="5,0,0,0" Text="username" FontSize="20" FontFamily="Arial" VerticalAlignment="Center"/></StackPanel></Border><!-- 密码输入框 --><Border Margin="0,10,0,0" Height="35" Width="340" BorderBrush="#878787" BorderThickness="1" CornerRadius="20"><StackPanel Orientation="Horizontal"><Ellipse Width="25" Height="25" Margin="5,0,0,0"><Ellipse.Fill><ImageBrush ImageSource="Images\password.png"/></Ellipse.Fill></Ellipse><TextBlock Margin="5,0,0,0" Text="password" FontSize="20" FontFamily="Arial" VerticalAlignment="Center"/></StackPanel></Border><!-- 登录按钮 --><Button Margin="0,25,0,0" Content="Sign In" Width="200" Background="#0072c0" Foreground="Wheat" FontSize="16"/></StackPanel></Border>

<Ellipse> 元素在WPF中用于绘制一个椭圆形或圆形(当宽度和高度相等时)。

代码片段创建了一个宽高均为25像素的圆形,并使用 <ImageBrush> 来填充这个圆形,使得圆形内部显示为图片

使用Canves进行图片布局

Canvas 是一种布局面板,它允许你通过显式设置元素的 Canvas.LeftCanvas.TopCanvas.RightCanvas.Bottom 属性来精确地定位子元素。Canvas 适用于需要绝对定位的场景

  <!-- bilibili图标 -->
<Canvas Grid.Column="0"><Image Source="Images\bilibili_word.png/" Width="40" Height="40"Canvas.Left="30" Canvas.Top="400"></Image></Canvas>
<!-- 退出按钮 --><Canvas Grid.Column="1"><Button Background="Transparent" Canvas.Left="485" Canvas.Top="5"BorderBrush="Transparent"><Image Source="Images\close.png" Width="25" Height="25"/></Button></Canvas>
http://www.yayakq.cn/news/760773/

相关文章:

  • 杨和网站建设wordpress图片编辑器
  • 东莞网站开发公司哪家好网站建设制作视频教程
  • 怎么用自己笔记本建设网站天空台108网站找手工活带回家做
  • 网站开发 招聘怎么注销建设银行网站用户
  • 如皋做网站的公司网站做cdn需要注意什么意思
  • 网站后台不显示网站怎么做不违法吗
  • 个人做 下载类网站三合一网站建设公司
  • 盐城网站设计公司做婚纱影楼网站的价格
  • 域名备案网站服务内容美容美发网站模板
  • php如何搭建网站后台楚天网站建设合同
  • html制作网站重庆做网站开发的集中
  • 化妆品网站建设思路做网站需要走哪些程序
  • 集团公司网站模板海报设计在线生成免费
  • 餐饮网站建设网站建设费用会计入什么费用
  • 即墨区城乡建设局网站官网网页制作的企业
  • 阿里云空间部署网站广西建设职业技术学院
  • 代理网站地址推介做界面的网站
  • 织梦高端html5网站建设工作室网络公司网站模板公司网站建设技术
  • 网站建设及优化 赣icp网站制作的要求
  • 如何创建游戏网站软件开发公司推荐
  • 博海博海网站建设新手怎么引流推广推广引流
  • 大型网站架构实战展览会建设网站平台的作用
  • 网站建设公司的成本有哪些方面网站备案没了
  • 不建网站如何做淘宝客做母婴育儿类网站好做seo排名吗
  • 云南省网站建设公司郴州最大的网络科技公司
  • 江苏手机网站建设公司wordpress页脚太高
  • 网站必做外链网站集约建设报告
  • 萍乡网站推广小程序介绍怎么写吸引人
  • 网站建设所学内容关闭wordpress注册功能
  • 网站开发 360浏览器做的网站很卡是什么原因呢