using System;
using System.Drawing;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using MPF.UI;
#pragma warning disable IDE1006 // Naming Styles
namespace WPFCustomMessageBox
{
///
/// Interaction logic for ModalDialog.xaml
///
internal partial class CustomMessageBoxWindow : Window
{
private readonly bool _removeTitleBarIcon = true;
public string? Caption
{
get
{
return Title;
}
set
{
Title = value;
}
}
public string? Message
{
get
{
return TextBlock_Message!.Text;
}
set
{
TextBlock_Message!.Text = value;
}
}
public string? OkButtonText
{
get
{
return Label_Ok!.Content.ToString();
}
set
{
Label_Ok!.Content = value.TryAddKeyboardAccellerator();
}
}
public string? CancelButtonText
{
get
{
return Label_Cancel!.Content.ToString();
}
set
{
Label_Cancel!.Content = value.TryAddKeyboardAccellerator();
}
}
public string? YesButtonText
{
get
{
return Label_Yes!.Content.ToString();
}
set
{
Label_Yes!.Content = value.TryAddKeyboardAccellerator();
}
}
public string? NoButtonText
{
get
{
return Label_No!.Content.ToString();
}
set
{
Label_No!.Content = value.TryAddKeyboardAccellerator();
}
}
public MessageBoxResult Result { get; set; }
#if NET35
private Button? Button_Cancel => ItemHelper.FindChild