C# Класс ModernWPF.Controls.MessageBoxControl

A base message box type DialogControl with custom content. A message box has built-in messagebox icon/caption/buttons.
Наследование: DialogControl
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
ContentMaxWidthProperty System.Windows.DependencyProperty
ContentMinWidthProperty System.Windows.DependencyProperty

Открытые методы

Метод Описание
OnApplyTemplate ( ) : void

When overridden in a derived class, is invoked whenever application code or internal processes call M:System.Windows.FrameworkElement.ApplyTemplate.

ShowDialogModal ( DialogControlContainer owner, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult

Shows the dialog with icon/caption/buttons.

ShowDialogModal ( Window owner, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult

Shows the dialog modal.

Защищенные методы

Метод Описание
OnClosing ( MessageBoxResult result ) : bool

Called when a non-cancel button is pressed and the control needs to verify if the result is allowed.

OnFocus ( ) : void

Called when dialog has been shown and focus needs to happen.

Приватные методы

Метод Описание
ApplyOptions ( ) : void
MessageBoxControl ( ) : System
_btnCancel_Click ( object sender, RoutedEventArgs e ) : void
_btnNo_Click ( object sender, RoutedEventArgs e ) : void
_btnOK_Click ( object sender, RoutedEventArgs e ) : void
_btnYes_Click ( object sender, RoutedEventArgs e ) : void

Описание методов

OnApplyTemplate() публичный Метод

When overridden in a derived class, is invoked whenever application code or internal processes call M:System.Windows.FrameworkElement.ApplyTemplate.
public OnApplyTemplate ( ) : void
Результат void

OnClosing() защищенный Метод

Called when a non-cancel button is pressed and the control needs to verify if the result is allowed.
protected OnClosing ( MessageBoxResult result ) : bool
result MessageBoxResult The result.
Результат bool

OnFocus() защищенный Метод

Called when dialog has been shown and focus needs to happen.
protected OnFocus ( ) : void
Результат void

ShowDialogModal() публичный Метод

Shows the dialog with icon/caption/buttons.
public ShowDialogModal ( DialogControlContainer owner, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult
owner DialogControlContainer A to host this message box.
caption string The caption.
button MessageBoxButton The button to display.
icon MessageBoxImage The icon to display.
defaultResult MessageBoxResult The default result.
Результат MessageBoxResult

ShowDialogModal() публичный Метод

Shows the dialog modal.
public ShowDialogModal ( Window owner, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult
owner System.Windows.Window A that contains in its visual tree.
caption string The caption.
button MessageBoxButton The button to display.
icon MessageBoxImage The icon to display.
defaultResult MessageBoxResult The default result.
Результат MessageBoxResult

Описание свойств

ContentMaxWidthProperty публичное статическое свойство

The dependency property for ContentMaxWidth.
public static DependencyProperty,System.Windows ContentMaxWidthProperty
Результат System.Windows.DependencyProperty

ContentMinWidthProperty публичное статическое свойство

The dependency property for ContentMinWidth.
public static DependencyProperty,System.Windows ContentMinWidthProperty
Результат System.Windows.DependencyProperty