Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 更改Krypton按钮实例的字体一次_C#_Krypton Toolkit - Fatal编程技术网

C# 更改Krypton按钮实例的字体一次

C# 更改Krypton按钮实例的字体一次,c#,krypton-toolkit,C#,Krypton Toolkit,如何通过编程放大KryptonButton实例中使用的字体 字体可以更改,但似乎没有效果 kryptonButton.StateCommon.GetContentShortTextFont(条形图)也会返回一种字体,但所有的访问器都是只读的,字体也是只读的。我知道有点晚了,但这可能会在将来帮助其他人 KryptonLabel kryptonLabel = new KryptonLabel(); FontFamily fontFamily = new FontFamily("Arial"); Fo

如何通过编程放大KryptonButton实例中使用的字体

字体可以更改,但似乎没有效果


kryptonButton.StateCommon.GetContentShortTextFont(条形图)也会返回一种字体,但所有的访问器都是只读的,字体也是只读的。

我知道有点晚了,但这可能会在将来帮助其他人

KryptonLabel kryptonLabel = new KryptonLabel();
FontFamily fontFamily = new FontFamily("Arial");
Font font = new Font(fontFamily, 30, FontStyle.Regular, GraphicsUnit.Pixel);
kryptonLabel.StateCommon.ShortText.Font = font;
您必须将“短文本”属性设置为新字体。如果希望尽可能多地维护字体,请尝试在创建新字体时读取以前的字体值

Font fontUpdatedSize = new Font(kryptonLabel.StateCommon.ShortText.Font.FontFamily,
                                        30,
                                        kryptonLabel.StateCommon.ShortText.Font.Style,
                                        GraphicsUnit.Pixel);
kryptonLabel.StateCommon.ShortText.Font = font;

我知道有点晚了,但这可能会在将来帮助其他人

KryptonLabel kryptonLabel = new KryptonLabel();
FontFamily fontFamily = new FontFamily("Arial");
Font font = new Font(fontFamily, 30, FontStyle.Regular, GraphicsUnit.Pixel);
kryptonLabel.StateCommon.ShortText.Font = font;
您必须将“短文本”属性设置为新字体。如果希望尽可能多地维护字体,请尝试在创建新字体时读取以前的字体值

Font fontUpdatedSize = new Font(kryptonLabel.StateCommon.ShortText.Font.FontFamily,
                                        30,
                                        kryptonLabel.StateCommon.ShortText.Font.Style,
                                        GraphicsUnit.Pixel);
kryptonLabel.StateCommon.ShortText.Font = font;