首页 > 其他分享 >WPFGroupBox控件自定义

WPFGroupBox控件自定义

时间:2022-08-18 16:46:56浏览次数:59  
标签:24 控件 自定义 WPFGroupBox Margin 9918AABD

先上效果图

 

 直接上代码(直接在Window.Resources里面添加这段代码)

<Style TargetType="GroupBox">
<Setter Property="Margin" Value="10,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GroupBox">
<Grid>
<Polyline Points="0 30,0 10,10 0,30 0" Stroke="#9918AABD" StrokeThickness="1" VerticalAlignment="Top" HorizontalAlignment="Left"/>
<Ellipse Width="4" Height="4" VerticalAlignment="Top" HorizontalAlignment="Left"
Fill="#9918AABD" Margin="24,-2,0,0"/>
<Ellipse Width="4" Height="4" VerticalAlignment="Top" HorizontalAlignment="Left"
Fill="#9918AABD" Margin="-2,24,0,0"/>
<Path Data="M0 0,3 3,30 3,33 0,68 0,73 7,78 7,78 10M8 0,25 0" Stroke="#5518AABD"
VerticalAlignment="Top" HorizontalAlignment="Right"/>
<Polyline Points="0,0 0,15 10,15" Stroke="#5518AABD" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<Polyline Points="10,0 0,10" Stroke="#5518AABD" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
<Polygon Points="0,7 7 7 7 0" Fill="#9918AABD" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,1,0,0" VerticalAlignment="Top"
Margin="30,-0.5,78,0"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,0,1,0" HorizontalAlignment="Right" Margin="0,10"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,1,0,0" VerticalAlignment="Bottom" Margin="10,0"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,0,1,0" HorizontalAlignment="Left" Margin="-0.5,15"/>

</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

标签:24,控件,自定义,WPFGroupBox,Margin,9918AABD
From: https://www.cnblogs.com/lisghxfdfgh/p/16599230.html

相关文章

  • Visual Studio自定义背景图片
    首先先打开我们的VisualStudio然后点击[扩展]-----------[管理扩展]然后搜索[Claudia],点击[下载]按钮稍等一下这时候会提示我们重新启动重新启动后会这样,稍等一......
  • WPF将控件转为图片(Visual试图转Bitmap)
    RenderTargetBitmaptarget=newRenderTargetBitmap((int)grid.ActualWidth,(int)grid.ActualHeight,96d,96d,PixelFormats.Default);target.Render(grid);Cropped......
  • winform开启线程实时输出日志到控件
    1、声明委托 publicdelegatevoidShowMessage2Form(stringmessage);2、声明事件staticpubliceventShowMessage2FormShowMessage;3、事件绑定LogHelper.ShowM......
  • 存储过程和函数(自定义函数)
    储存过程和函数:存储过程:         分类:1.存储过程的参数类型可以是IN、OUT和INOUT。根据这点分类如下:             ......
  • Unity获取脚本的CustomEditor(自定义编辑)数据
    在此之前,粗略的介绍下CustomEditor(自定义编辑)。Unity对于我们创建的Mono脚本提供了属性面板的展示和修改。默认情况下,Inspector面板中会显示当前脚本类的公开字段(publi......
  • 大文件上传控件webupload插件
    ​这里只写后端的代码,基本的思想就是,前端将文件分片,然后每次访问上传接口的时候,向后端传入参数:当前为第几块文件,和分片总数下面直接贴代码吧,一些难懂的我大部分都加上注......
  • vue中使用自定义字体
    1、在scss文件内引入,且将scss文件导入到全局,一般都是将自定义字体作为一个单独的scss文件存放,再将该字体文件导入到全局的样式文件内,@importurl('./font.scss');,再将全局......
  • 使用自定义字体 vue electron
    1,把自定义字体包导入项目  2,font.css文件下1字体名2字体路径3,4字体样式(可省略) 3,App。vue文件中修改样式中的font-family属性   ......
  • 技术分享 | app自动化测试(Android)--App 控件定位
    原文链接客户端的页面通过XML来实现UI的布局,页面的UI布局作为一个树形结构,而树叶被定义为节点。这里的节点也就对应了要定位的元素,节点的上级节点,定义了元素的布局......
  • 转载_[VS Code]Visual Studio Code 添加自定义snippet(代码段),附详细配置
    [VSCode]跟我一起在VisualStudioCode添加自定义snippet(代码段),附详细配置AddcodesnippetsforCLANGinVSCode日志:2021.12.16VSCode自v1.40起,引入新的变量......