-
C# 为文字创建渐变色的下划线
C# 为文字创建渐变色的下划线,放大后还是很漂亮的,下划线变成了点状的,而且是颜色是渐变的,下面介绍实现这一功能的代码,给字符串创建渐变色下划线,核心代码如下:
TextDecoration MyUnderline = new TextDecoration();
Pen MyPen = new Pen();
MyPen.Brush = new LinearGradientBrush(Colors.Green,
Colors.Blue, new Point(0, 0.5), new Point(1, 0.5));
MyPen.Brush.Opacity = 0.5;
MyPen.Thickness = 1.5;
MyPen.DashStyle = DashStyles.Dash;
MyUnderline.Pen = MyPen;
MyUnderline.PenThicknessUnit = TextDecorationUnit.FontRecommended;
TextDecorationCollection MyCollection = new TextDecorationCollection();
MyCollection.Add(MyUnderline);
this.textBlock1.Text = "中华人民共和国";//自定义要显示下划线的文字
this.textBlock1.FontSize = 48;
this.textBlock1.TextDecorations = MyCollection;
需要请下载完整源码。运行效果图如下。
- 2022-01-22 05:14:06下载
- 积分:1
-
家庭理财
采用windows编写了家庭理财程序,程序具有良好的界面布局,通过用户设置登录账号与密码实现用户对自己日常开销,账目存储做详细的记录,对想做理财的用户非常有用。
- 2022-02-13 11:14:48下载
- 积分:1
-
实验1数码管与键盘实验
串口输出:LED_KEP test!;
程序运行后8LED会数字滚动,LED跑马,然后按键盘8LED会显示不同的键值;
屏幕上显示相关的文字。(Serial port output: LED_KEP test!;
After the program runs, the 8LED will scroll digitally, the LED will run horse, and then the keypad 8LED will display different keys.
The relevant text is displayed on the screen.)
- 2019-05-04 16:44:10下载
- 积分:1
-
The C++ Programming Language (Third Edition)
最为经典的c++教程,大概好多人都有了中文版吧?这个是英文原版的,推荐(most classic c Directory, a lot of people probably have a Chinese version of it is the original English version and recommended)
- 2004-07-10 17:26:33下载
- 积分:1
-
Wireless Energy Harvesting for the Internet of Things Using NetSim Simulator.
;
- 2022-06-26 19:02:39下载
- 积分:1
-
scst
自动生成实体类(很好用的代码)非常经典的学习代码,我的珍藏(Automatic generation of entity classes (good with the code) is very classical learning the code, my treasure)
- 2009-12-23 22:09:21下载
- 积分:1
-
LLogitbooosto
Logitboost 是一种改进的boostingg算法,可以用作参考 ,
(Logitboost an improved boostingg algorithm can be used as a reference,)
- 2012-08-16 06:33:55下载
- 积分:1
-
wutijianceyuzhuizong
opencv,图像处理,关于物体粘连问题的检测,基于凹性分析的分割方法(opencv, image processing, object sticking problem on detection, segmentation method based on analysis of the recess)
- 2015-08-08 15:10:00下载
- 积分:1
-
2.3
一个简单的猜数游戏程序:
利用Math.random()方法生成0-1之间的double型数dNum,将dNum转换为0-100之间的整数iNum。
利用KeyInput.readInt()方法接收键盘输入的整数inNum。如果inNum小于iNum,在屏幕上显示“输入的值小,请输入更大的数.”;如果inNum大于iNum,在屏幕上显示“输入的值大,请输入更小的数.”;如果inNum等于iNum,在屏幕上显示“猜对了.”,并结束运行。
猜测错误的时候,重新输入inNum,直到猜对为止。如果猜测10次后仍未猜对,显示“猜测次数已达10次,猜数失败.”,并结束程序的运行。
(A simple guessing game program: use Math.random () method to generate double-type numbers between 0-1 dNum, will dNum into an integer between 0-100 iNum. use KeyInput.readInt () method receives the keyboard input integer inNum. If inNum less than iNum, the screen " Enter the value of the small, enter the greater number." If inNum than iNum, the screen " Enter the value of the large number of smaller type." If inNum equal iNum, displayed on the screen, " guessed." and end the run. guess wrong, re-enter inNum, until you guess it right up. If the guess was right 10 times not to show " guess the number has reached 10 times, guess the number of failures." And end the program.)
- 2010-11-03 14:29:09下载
- 积分:1
-
Beamform
该程序是基于时间延迟求和的波束成形算法的实现,根据是结果来看有很好的效果(The program is based on the sum of the time delay beamforming algorithm, based on results, there is a good effect)
- 2021-01-21 01:18:46下载
- 积分:1