当前位置:网站首页>border控件的使用
border控件的使用
2022-07-31 15:08:00 【济南医疗小程序状元】
border控件的使用
<Window x:Class="WpfApp1.control.Windowborder"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1.control"
mc:Ignorable="d"
Title="Windowborder" Height="450" Width="800">
<Grid>
<!--
BorderThickness 边框宽度默认为0 直接设置一个参数 代表的是四周宽度
BorderThickness 有四个参数时候,分别代表左边,上边,右边,下边
CornerRadius
我们设置边框颜色加上边框宽度,才能准确显示 边框的效果。
如果我们需要设置 角的弧度 ,需要使用CornerRadius 这个属性。
-->
<Border Width="200" Height="80"
Background="LightBlue"
BorderBrush="red" BorderThickness="1,1,2,1"
CornerRadius="15"
>
<!--<Label HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="20" Foreground="White">我是label1</Label>-->
<!--Border 只能有一个孩子. 写入第二个孩子,就报错了!
<Label HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="20" Foreground="White">我是label1</Label>-->
<!--<Grid>
<Label
FontSize="20" Foreground="White">我是label1</Label>
<Label HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="20" Foreground="White">我是label2</Label>
<Label HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="20" Foreground="White">我是label3</Label>
</Grid>-->
<Button Background="Transparent" FontSize="20" Foreground="White"
Content="I is a 按钮" Click="Button_Click" BorderBrush="Transparent">
</Button>
</Border>
</Grid>
</Window>
效果

边栏推荐
猜你喜欢

【MySQL】Mysql范式及外键作用

Spark学习(2)-Spark环境搭建-Local

Prometheus之node_exporter性能监控信息采集含义

NC | 斯坦福申小涛等开发数据可重复分析计算框架TidyMass

英文语法-时与态

UnityShader入门学习(二)——渲染流水线

Introductory UnityShader learning (2) - the rendering pipeline

Getting started with UnityShader (1) - GPU and Shader

Synchronized and volatile interview brief summary

STM32(十)------- SPI通信
随机推荐
How to grab configuration information for DELL SC compellent storage system
R language ggplot2 visualization: use the ggboxplot function of the ggpubr package to visualize the box plot, use the font function to customize the font size, color, style (bold, italic) of the legen
Use of el-tooltip
TRACE32——基于SNOOPer的变量记录
谷歌CTS测试(cta测试)
定时器的类型
DeepLab系列学习
Ubantu专题5:设置静态ip地址
Synchronized and volatile interview brief summary
Nuget打包并上传教程
工程水文学试卷
Word table to Excel
Introductory UnityShader learning (2) - the rendering pipeline
OpenShift 4 - Deploy Redis Cluster with Operator
c语言hello world代码(代码编程入门)
Gorm—Go language database framework
Groupid(artifact id)
Efficient use of RecyclerView Section 2
LeetCode二叉树系列——226.翻转二叉树
R语言检验样本是否符合正态性(检验样本是否来自一个正态分布总体):shapiro.test函数检验样本是否符合正态分布(normality test)