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

wpf 定制 个性圆角信息面板

先上图:

代码实现:

    <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.mrgr.cn/news/6627.html

相关文章:

  • 机器学习基础(Datawhale X 李宏毅苹果书 AI夏令营)
  • conda大全及实操
  • Circuitjs 快捷键完全列表
  • Python酷库之旅-第三方库Pandas(090)
  • 小琳AI课堂:Llama——NLP界的多面手
  • 【代码随想录训练营第42期 Day38打卡 - 动态规划Part6 - LeetCode 322. 零钱兑换 279.完全平方数 139.单词拆分
  • <数据集>遥感船舶识别数据集<目标检测>
  • 微信小程序用 pinia数据化存储信息
  • mysql regexp匹配多个字符串
  • 【Qt笔记】QPushButton控件详解
  • 游戏如何对抗 IL2cppDumper逆向分析
  • Centos7配置代理安装最新版Docker并拉取镜像
  • react 中的useState useEffect
  • MySQL用户与权限管理
  • .Net 6 WebApi项目中使用Log4Net详解
  • 单一职责原则在微服务中的应用:服务分解与职责明确
  • 产品需求文档
  • 【C++】提高 -- 类模板
  • C++初学(14)
  • 商品视频与多媒体展示:API返回值中的新趋势