当前位置:网站首页>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>
效果
边栏推荐
猜你喜欢
随机推荐
WeChat chat record search in a red envelope
TRACE32 - SNOOPer-based variable logging
网银被盗?这篇文章告诉你如何安全使用网银
安装Xshell并使用其进行Ymodem协议的串口传输
Message queue data storage MySQL table design
Advanced Mathematics - Commonly Used Indefinite Integral Formulas
LeetCode二叉树系列——110.平衡二叉树
Introduction to BigDecimal, common methods
NC | 斯坦福申小涛等开发数据可重复分析计算框架TidyMass
2021 OWASP TOP 10 Vulnerability Guide
The R language ggstatsplot package ggbarstats function visualizes bar charts, and adds hypothesis test results (including sample number, statistics, effect size and its confidence interval, significan
"Listen to me, thank you" can be said in ancient poetry?Tsinghua University has developed an artifact of "Searching Sentences According to Meaning", which can search for the famous sayings you want wi
Unity Shader入门精要学习——透明效果
element-plus虚拟表格virtual-list组件中是怎么实现清理lodash.memoize缓存的?
力扣:56. 合并区间
Spark学习(3)-Spark环境搭建-Standalone
Getting started with UnityShader (1) - GPU and Shader
R语言ggplot2可视化:使用ggpubr包的ggmaplot函数可视化MA图(MA-plot)、font.legend参数和font.main参数设置标题和图例字体加粗
UnityShader入门学习(一)——GPU与Shader
DeepLab系列学习