码迷,mamicode.com
首页 > Windows程序 > 详细

Windows8 UI MessageBox In DevExpress

时间:2016-12-04 13:45:34      阅读:473      评论:0      收藏:0      [点我收藏+]

标签:apt   cti   style   pac   ogr   ons   ima   view   gre   

// custom messagebox 
using System;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraBars.Docking2010.Views.WindowsUI;
using DevExpress.XtraBars.Docking2010.Customization;

namespace StatTools
{
    public static class MessageBoxService
    {
        public static DialogResult ShowMessageBox(Form InOwner, string InCaption, string InMessage, bool bShowCancel = false)
        {
            FlyoutAction action = new FlyoutAction() { Caption = InCaption, Description = InMessage };
            FlyoutCommand command1 = new FlyoutCommand() { Text = "确定", Result = System.Windows.Forms.DialogResult.Yes };
            
            action.Commands.Add(command1);

            if( bShowCancel )
            {
                FlyoutCommand command2 = new FlyoutCommand() { Text = "取消", Result = System.Windows.Forms.DialogResult.No };
                action.Commands.Add(command2);
            }
            
            FlyoutProperties properties = new FlyoutProperties();
            properties.ButtonSize = new Size(100, 40);
            properties.Style = FlyoutStyle.MessageBox;

            return FlyoutDialog.Show(InOwner, action);
        }
    }
}

技术分享

Windows8 UI MessageBox In DevExpress

标签:apt   cti   style   pac   ogr   ons   ima   view   gre   

原文地址:http://www.cnblogs.com/bodong/p/6130425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!