[英]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.