Modify the contents of XtraMessageBox font size

Modify the contents of XtraMessageBox font size

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);

Reproduced in: https: //my.oschina.net/mysticboy/blog/541392

Guess you like

Origin blog.csdn.net/weixin_34391445/article/details/92064646