修改XtraMessageBox的内容字体大小

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

你可能感兴趣的:(修改XtraMessageBox的内容字体大小)