[英]How can i manipulate the Font Properties in c# on a run time
我真的很陌生,试图在C#Windows窗体中操纵文本或图表标题的font属性
到目前为止,我尝试了这些:
Font font = new System.Drawing.Font(FontStyle.Bold) <-- it wouldn't do debugging
Chart1.Title[0].Font = new Font(Chart1.Title[0].Font,
Chart1.Title[0].Font.Style | FontStyle.Bold); <-- this got pass to debugging by no effect
Chart1.Title[0].Font(FontStyle.Bold); <-- so is this one pass debugging but no effect.
我开始尝试将它的文本设置为Windows窗体中的粗体,但只在Web应用程序上使用了,它的标题/或某些文本要简单得多
我如何设置它的专有标题字体将文本更改为粗体而不是普通字体?
尝试这个:
Title title = Chart1.Titles.Add("Test");
title.Font = new System.Drawing.Font("Arial", 16, FontStyle.Bold);
title.ForeColor = System.Drawing.Color.FromArgb(0, 0, 205);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.