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