Example #1
0
        public static bool ShowInformationYesNo(string caption, string header, string text, string details, Window wnd)
        {
            var dialog = new MdrMessageBox()
            {
                Owner              = wnd,
                Caption            = string.IsNullOrWhiteSpace(caption) ? "Message" : caption,
                InstructionHeading = string.IsNullOrWhiteSpace(header) ? "???" : header,
                InstructionText    = string.IsNullOrWhiteSpace(text) ? String.Empty : text,
                DeatilsText        = string.IsNullOrWhiteSpace(details) ? String.Empty : details
            };

            dialog.SetButtonsPredefined(EnumPredefinedButtons.YesNo);
            dialog.DetailsExpander.Visibility = string.IsNullOrEmpty(details) ? Visibility.Collapsed : Visibility.Visible;
            return((bool)dialog.ShowDialog());
        }