wpf 定制 个性圆角信息面板

ops/2024/9/22 15:55:53/

先上图:

代码实现:

    <Canvas Grid.Column="1"><Border Background="#5665F4" BorderBrush="#5665F4" BorderThickness="0.5" CornerRadius="10,10,10,30"Width="180" Height="165" TextBlock.Foreground="White"Canvas.Left="16" Canvas.Top="90"><Border.Effect><DropShadowEffect BlurRadius="40" ShadowDepth="20" Direction="270" Color="#5665F4" Opacity="0.2"/></Border.Effect><Grid Margin="0,0,0,20"><Grid.RowDefinitions><RowDefinition/><RowDefinition/><RowDefinition/><RowDefinition/></Grid.RowDefinitions><Border Height="0.4" Background="#DDD" VerticalAlignment="Bottom"/><StackPanel Orientation="Horizontal" VerticalAlignment="Center"TextBlock.FontSize="14" TextBlock.FontWeight="Bold"><TextBlock Text="&#xe61d;" FontFamily="{StaticResource Iconfont}"FontSize="18" Margin="15,0"/><TextBlock Text="生产情况" VerticalAlignment="Center"/></StackPanel><TextBlock Text="累计生产量" Grid.Row="1" VerticalAlignment="Bottom" Margin="15,0"FontSize="11" Opacity="0.6"/><TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right"Grid.Row="1" Margin="15,0"><Run Text="263846" FontSize="18"/><Run Text="T" FontSize="15"/></TextBlock><TextBlock Text="累计生产量" Grid.Row="2" VerticalAlignment="Bottom" Margin="15,0"FontSize="11" Opacity="0.6"/><TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right"Grid.Row="2" Margin="15,0"><Run Text="83" FontSize="18"/><Run Text="%" FontSize="15"/></TextBlock><TextBlock Text="累计生产量" Grid.Row="3" VerticalAlignment="Bottom" Margin="15,0"FontSize="11" Opacity="0.6"/><TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right"Grid.Row="3" Margin="15,0"><Run Text="2" FontSize="18"/><Run Text="个" FontSize="15"/></TextBlock></Grid></Border><Border Background="#F5F7FB" BorderBrush="#C7C9DB" BorderThickness="0.5" CornerRadius="10,10,10,30"Width="170" Height="110" TextBlock.Foreground="#5665F4"Canvas.Left="210"><Border.Effect><DropShadowEffect BlurRadius="40" ShadowDepth="20" Direction="270" Color="#5665F4" Opacity="0.2"/></Border.Effect><Grid Margin="0,0,0,20"><Grid.RowDefinitions><RowDefinition/><RowDefinition/><RowDefinition/></Grid.RowDefinitions><Border Height="0.4" Background="#C7C9DB" VerticalAlignment="Bottom"/><StackPanel Orientation="Horizontal" VerticalAlignment="Center"TextBlock.FontSize="14" TextBlock.FontWeight="Bold"><TextBlock Text="&#xe62d;" FontFamily="{StaticResource Iconfont}"FontSize="18" Margin="15,0"/><TextBlock Text="人员情况" VerticalAlignment="Center"/></StackPanel><TextBlock Text="生产人员" Grid.Row="1" VerticalAlignment="Bottom" Margin="15,0"FontSize="11" Opacity="0.6"/><TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right"Grid.Row="1" Margin="15,0"><Run Text="245" FontSize="20"/><Run Text="人" FontSize="15"/></TextBlock><TextBlock Text="出勤率" Grid.Row="2" VerticalAlignment="Bottom" Margin="15,0"FontSize="11" Opacity="0.6"/><TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right"Grid.Row="2" Margin="15,0"><Run Text="92" FontSize="20"/><Run Text="%" FontSize="15"/></TextBlock></Grid></Border><Border Background="#225665F4" BorderBrush="#5665F4" BorderThickness="0.5" CornerRadius="10,10,10,25"Width="160" Height="80" TextBlock.Foreground="#FFF"Canvas.Left="250" Canvas.Top="200"><Border.Effect><DropShadowEffect BlurRadius="40" ShadowDepth="20" Direction="270" Color="#5665F4" Opacity="0.2"/></Border.Effect><Grid Margin="0,0,0,20"><Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions><Border Height="0.4" Background="#5665F4" VerticalAlignment="Bottom"/><StackPanel Orientation="Horizontal" VerticalAlignment="Center"TextBlock.FontSize="14" TextBlock.FontWeight="Bold"><TextBlock Text="&#xe604;" FontFamily="{StaticResource Iconfont}"FontSize="18" Margin="15,0"/><TextBlock Text="质量情况" VerticalAlignment="Center"/></StackPanel><TextBlock Text="通过质检比例" Grid.Row="1" VerticalAlignment="Bottom" Margin="15,0"FontSize="11" Opacity="0.6"/><TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right"Grid.Row="1" Margin="15,0"><Run Text="94" FontSize="20"/><Run Text="%" FontSize="15"/></TextBlock></Grid></Border></Canvas>


http://www.ppmy.cn/ops/98659.html

相关文章

C语言 之 memcpy函数的内存重叠问题 及解决该问题的思路

文章目录 函数原型&#xff1a;例子&#xff1a; 解决方式整体思路如下&#xff1a; 内存重叠问题主要是使用函数memcpy的时候会发生的 函数原型&#xff1a; void * memcpy ( void * destination, const void * source, size_t num);这个函数能够在source指向的空间中拷贝nu…

【ACL2024】基于长尾检索知识增强的大语言模型

近日&#xff0c;阿里云人工智能平台PAI与阿里集团安全部内容安全算法团队、华东师范大学何晓丰教授团队合作&#xff0c;在自然语言处理顶级会议ACL2024上发表论文《On the Role of Long-tail Knowledge in Retrieval Augmented Large Language Models》&#xff0c;论文主题为…

编译 buildroot 错误录

编译 buildroot 错误录 为什么要记录编译过程的错误&#xff1f; 问题定位和诊断 明确错误来源&#xff1a;编译错误记录提供了错误发生的位置和性质&#xff0c;使工程师能够迅速定位到问题的源头。日志通常会包含文件名、行号以及错误消息&#xff0c;帮助工程师确定出错的…

Swift 内存管理:精通强、弱、无主之地

标题&#xff1a;Swift 内存管理&#xff1a;精通强、弱、无主之地 Swift 语言以其现代化的内存管理机制而闻名&#xff0c;主要通过自动引用计数&#xff08;ARC&#xff09;来简化内存管理。然而&#xff0c;为了充分利用 Swift 的性能并避免常见的内存问题&#xff0c;开发…

HashMap 的长度为什么是2的幂次方

HashMap 的长度为什么是2的幂次方 因为这样可以让计算桶位置的操作更加高效。 具体来说&#xff0c;如果 HashMap 的长度是 2 的幂次方&#xff0c;那么计算桶位置时可以使用位运算来代替除法运算&#xff0c;从而提高计算速度。 我们都知道为了找到 KEY 的位置在哈希表的哪…

JDK各LTS版本下载,包含JDK8、11、17、21版本(文章末尾附带直接下载链接)

JDK各LTS版本下载&#xff0c;包含JDK8、11、17、21版本&#xff08;文章末尾附带直接下载链接&#xff09; 前言 最近oracle官网对于JDK的下载&#xff0c;需要先登录才能下咋&#xff0c;整个过程显得麻烦又繁琐&#xff0c;在这里我为大家准备了各个LTS版本的下载链接&…

Anki自动生成语音

文章目录 前言安装插件制作音频一些注意事项语音消失现象不同端出现媒体文件丢失 参考文章 前言 已经实现了通过使用Obsidian实现Anki快速制卡。 对于语言学习&#xff0c;仅仅只有不同语言文字的对照是不够的&#xff0c;我们还需要声音。 所以就需要加入音频。 幸好 Anki…

物权法总论

第一编 物权法总论 第一章 物权概述 1.什么叫物权&#xff1f;P.6 物权的定义是&#xff0c;物权人直接支配特定物并排他性地享受其利益的权利。我国《物权法》第2条第3款规定&#xff1a;“本法所称物权&#xff0c;是指权利人依法对特定的物享有直接支配和排他的权利&am…