其他分享
首页 > 其他分享> > 修改XtraMessageBox的内容字体大小

修改XtraMessageBox的内容字体大小

作者:互联网

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

修改XtraMessageBox的内容字体大小

public static DialogResult Show(UserLookAndFeel lookAndFeel, IWin32Window owner, string text, string caption, DialogResult[] buttons, Icon icon, int defaultButton, MessageBoxIcon messageBeepSound)
        {

            XtraMessageBoxForm form = new XtraMessageBoxForm();
            Font defaultFont = AppearanceObject.DefaultFont;
            FontFamily defaultFontFamily = defaultFont.FontFamily;
            Font _MessageFont = new Font(defaultFontFamily, 24); //
            form.Appearance.Font = _MessageFont;
            form.MaximumSize = new Size(550, 1000);
            return form.ShowMessageBoxDialog(new XtraMessageBoxArgs(lookAndFeel, owner, text, caption, buttons, icon, defaultButton));
        }

调用方法:
 
        
            Show(LookAndFeel, this, "sdf", "", new DialogResult[] { DialogResult.OK }, null, 0, MessageBoxIcon.Information);

转载于:https://my.oschina.net/mysticboy/blog/541392

标签:字体大小,form,text,XtraMessageBox,DialogResult,修改,new,Font
来源: https://blog.csdn.net/weixin_34391445/article/details/92064646