Skip to content

MessageDialog

JaykeBird edited this page Feb 21, 2023 · 9 revisions

Back to home | Back to Reference | View raw text

MessageDialog class

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph SolidShineUi
  SolidShineUi.MessageDialog[[MessageDialog]]
  SolidShineUi.FlatWindow[[FlatWindow]]
  end
  subgraph System.Windows.Markup
System.Windows.Markup.IComponentConnector[[IComponentConnector]]
  end
System.Windows.Markup.IComponentConnector --> SolidShineUi.MessageDialog
SolidShineUi.FlatWindow --> SolidShineUi.MessageDialog
Loading

Members

Properties

Public properties

Type Name Methods
string CancelButtonText
Get or set the text to display in the Cancel button. If empty, the button will not be displayed.
get, set
string CheckBoxText
Get or set the text to display with the checkbox. If empty, the checkbox will not be displayed.
get, set
bool CheckBoxValue
Get or set the checked state of the checkbox. Use the checkbox to display a "Remember my choice"-style option.
get, set
ColorScheme ColorScheme
The color scheme to use with the message dialog.
get, set
MessageDialogResult DialogResult
Get the result of the message dialog, indicating which button the user pressed.
get
string DiscardButtonText
Get or set the text to display in the Discard button. If empty, the button will not be displayed.
get, set
string ExtraButton1Text
Get or set the text to display in the first extra button. If empty, the button will not be displayed.
get, set
string ExtraButton2Text
Get or set the text to display in the second extra button. If empty, the button will not be displayed.
get, set
string ExtraButton3Text
Get or set the text to display in the third extra button. If empty, the button will not be displayed.
get, set
MessageDialogImage Image
Get or set the image to display with the message.
get, set
string Message
Get or set the text to display for the message.
get, set
string OkButtonText
Get or set the text to display in the OK button. If empty, the button will not be displayed (unless the other buttons are also not displayed, in which case this one will be).
get, set

Methods

Public methods

Returns Name
void ApplyColorScheme(...)
Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.
void InitializeComponent()
InitializeComponent
MessageDialogResult ShowDialog(...)
Display this message dialog. Use the properties such as OkButtonText or CancelButtonText and Message to control the appearance of the message dialog.

Internal methods

Returns Name
Delegate _CreateDelegate(Type delegateType, string handler)

Public Static methods

Returns Name
void OnColorSchemeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Perform an action when the ColorScheme property has changed. Primarily used internally.

Details

Inheritance

Constructors

MessageDialog [1/2]

public MessageDialog()
Summary

Create a new MessageDialog.

MessageDialog [2/2]

public MessageDialog(ColorScheme cs)
Arguments
Type Name Description
ColorScheme cs The ColorScheme to use for this MessageDialog.
Summary

Create a new MessageDialog, with the ColorScheme property preset.

Methods

ApplyColorScheme [1/2]

public void ApplyColorScheme(ColorScheme cs)
Arguments
Type Name Description
ColorScheme cs The color scheme to apply.
Summary

Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.

ApplyColorScheme [2/2]

public void ApplyColorScheme(HighContrastOption hco)
Arguments
Type Name Description
HighContrastOption hco The high-contast color scheme to apply.
Summary

Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.

OnColorSchemeChanged

public static void OnColorSchemeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Arguments
Type Name Description
DependencyObject d The object containing the property that changed.
DependencyPropertyChangedEventArgs e Event arguments about the property change.
Summary

Perform an action when the ColorScheme property has changed. Primarily used internally.

ShowDialog [1/3]

public MessageDialogResult ShowDialog()
Summary

Display this message dialog. Use the properties such as OkButtonText or CancelButtonText and Message to control the appearance of the message dialog.

ShowDialog [2/3]

public MessageDialogResult ShowDialog(string message, ColorScheme colorScheme, Window owner, string title, bool showTwoBottomButtons, MessageDialogImage image, MessageDialogResult defaultButton, string customOkButtonText, string customCancelButtonText, string extraButton1Text, string extraButton2Text, string extraButton3Text, string checkBoxText)
Arguments
Type Name Description
string message The message to display.
ColorScheme colorScheme The color scheme to use with the dialog. Use null if already set via property.
Window owner The owner window of this dialog. Use null if already set via property.
string title The window title for this dialog. Use null if already set via property.
bool showTwoBottomButtons Determine if one or two buttons should be shown (either [OK], or [OK] and [Cancel]). If false, only OK button is displayed.
MessageDialogImage image The image to display with this dialog.
MessageDialogResult defaultButton The button to have selected by default when the dialog opens. (DOESN'T CURRENTLY WORK)
string customOkButtonText The text to use in the OK button. Use null if already set via property.
string customCancelButtonText The text to use in the Cancel button. Use null if already set via property.
string extraButton1Text The text to use in the first extra button. If this is set to a null or empty string, this button will not be displayed.
string extraButton2Text The text to use in the second extra button. If this is set to a null or empty string, this button will not be displayed.
string extraButton3Text The text to use in the third extra button. If this is set to a null or empty string, this button will not be displayed.
string checkBoxText The text to use in the check box. If this is set to a null or empty string, the check box will not be displayed.
Summary

Display this message dialog. This is an obsolete method, please use one of the other ones.

ShowDialog [3/3]

public MessageDialogResult ShowDialog(string message, ColorScheme colorScheme, Window owner, string title, MessageDialogButtonDisplay buttonDisplay, MessageDialogImage image, MessageDialogResult defaultButton, string customOkButtonText, string customCancelButtonText, string customDiscardButtonText, string extraButton1Text, string extraButton2Text, string extraButton3Text, string checkBoxText)
Arguments
Type Name Description
string message The message to display.
ColorScheme colorScheme The color scheme to use with the dialog. Use null if already set via property.
Window owner The owner window of this dialog. Use null if already set via property.
string title The window title for this dialog. Use null if already set via property.
MessageDialogButtonDisplay buttonDisplay Determine how many buttons should be displayed at the bottom of the dialog, either [OK], [OK] and [Cancel], or [OK] [Discard] and [Cancel].
MessageDialogImage image The image to display with this dialog.
MessageDialogResult defaultButton The button to have selected by default when the dialog opens. (DOESN'T CURRENTLY WORK)
string customOkButtonText The text to use in the OK button. Use null if already set via property.
string customCancelButtonText The text to use in the Cancel button. Use null if already set via property.
string customDiscardButtonText The text to use in the Discard button. Use null if already set via property.
string extraButton1Text The text to use in the first extra button. If this is set to a null or empty string, this button will not be displayed.
string extraButton2Text The text to use in the second extra button. If this is set to a null or empty string, this button will not be displayed.
string extraButton3Text The text to use in the third extra button. If this is set to a null or empty string, this button will not be displayed.
string checkBoxText The text to use in the check box. If this is set to a null or empty string, the check box will not be displayed.
Summary

Display this message dialog.

InitializeComponent

public virtual void InitializeComponent()
Summary

InitializeComponent

_CreateDelegate

internal Delegate _CreateDelegate(Type delegateType, string handler)
Arguments
Type Name Description
Type delegateType
string handler

Properties

ColorScheme

public ColorScheme ColorScheme { get; set; }
Summary

The color scheme to use with the message dialog.

OkButtonText

public string OkButtonText { get; set; }
Summary

Get or set the text to display in the OK button. If empty, the button will not be displayed (unless the other buttons are also not displayed, in which case this one will be).

CancelButtonText

public string CancelButtonText { get; set; }
Summary

Get or set the text to display in the Cancel button. If empty, the button will not be displayed.

DiscardButtonText

public string DiscardButtonText { get; set; }
Summary

Get or set the text to display in the Discard button. If empty, the button will not be displayed.

ExtraButton1Text

public string ExtraButton1Text { get; set; }
Summary

Get or set the text to display in the first extra button. If empty, the button will not be displayed.

ExtraButton2Text

public string ExtraButton2Text { get; set; }
Summary

Get or set the text to display in the second extra button. If empty, the button will not be displayed.

ExtraButton3Text

public string ExtraButton3Text { get; set; }
Summary

Get or set the text to display in the third extra button. If empty, the button will not be displayed.

DialogResult

public MessageDialogResult DialogResult { get; }
Summary

Get the result of the message dialog, indicating which button the user pressed.

Message

public string Message { get; set; }
Summary

Get or set the text to display for the message.

CheckBoxText

public string CheckBoxText { get; set; }
Summary

Get or set the text to display with the checkbox. If empty, the checkbox will not be displayed.

CheckBoxValue

public bool CheckBoxValue { get; set; }
Summary

Get or set the checked state of the checkbox. Use the checkbox to display a "Remember my choice"-style option.

Image

public MessageDialogImage Image { get; set; }
Summary

Get or set the image to display with the message.

Generated with ModularDoc

Clone this wiki locally