首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 谷 歌 Chrome进度条

谷 歌 Chrome进度条

  • 资源大小:17.50 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: 按钮控件 c#

资 源 简 介

翻译 maninwest@Codeforge 作者:VallarasuS@CodeProject这里展示如何从头开始创建一个 Go ogle Chrome 主题的 进度条。任何进度条控件都依赖于一个值及表示进度值的图形。 Goo gle Chrome 下载程序有个圆圈表示进度。使用代码ChromeProgressBaris 跟 Chrome ProgressBar 的工作原理一样。将进度值转化为一个圆圈图形来表示.private void PaintProgress(PaintEventArgs e) { using( SolidBrush progressBrush = new SolidBrush(this.ProgressColor)) { Rectangle rect = LayoutInternal.ProgressRectangle; rect.Inflate(-2, -2); rect.Height -= 2; rect.Width -= 2; float startAngle = -90; float sweepAngle = Progress / 100 * 360; e.Graphics.FillPie(progressBrush, rect, startAngle, sweepAngle); } }这里是如何使用图形路径和4条线绘制圆圈和细分部分。对 Graphics 对象的剪切部分进行调整来剪切圆圈外的线。private void PaintBorder(PaintEventArgs e) { GraphicsPath borderPath = new GraphicsPath(); Rectangle progressRect = LayoutInternal.Prog

文 件 列 表

ChromeProgressBar_Demo
ChromeProgressBar_Demo.csproj
DemoForm.cs
DemoForm.Designer.cs
DemoForm.resx
Program.cs
Properties
ProgressBarGoogleChrome
ChromeProgressBar.cs
Icon
ProgressBar_GoogleChrome.csproj
Properties
ProgressBarGoogleChrome.sln

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.198894s