Volume Control
Application-specific hotkeys for Windows
VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData Class Reference

Data model for CustomMessageBox windows. More...

Inheritance diagram for VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData:
Collaboration diagram for VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData:

Public Member Functions

 CustomMessageBoxData ()
 Creates a new CustomMessageBoxData instance without specifying any parameters. More...
 
 CustomMessageBoxData (Window owner)
 Creates a new CustomMessageBoxData instance with the specified owner . More...
 
 CustomMessageBoxData (Window owner, object content)
 Creates a new CustomMessageBoxData instance with the specified owner and content . More...
 
 CustomMessageBoxData (Window owner, object content, string caption)
 Creates a new CustomMessageBoxData instance with the specified owner , content , and caption . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , and buttons . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, ImageSource icon, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxImage icon, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, CustomMessageBoxButton? defaultResult, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , and buttons . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, ImageSource icon, CustomMessageBoxButton? defaultResult, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxImage icon, CustomMessageBoxButton? defaultResult, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxButton buttons)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , and buttons . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxButton buttons, ImageSource icon)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , and icon . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxButton buttons, ImageSource icon, MessageBoxResult defaultResult)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxButton buttons, MessageBoxImage icon)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , and icon . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxButton buttons, MessageBoxImage icon, MessageBoxResult defaultResult)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxButton buttons, MessageBoxImage icon, MessageBoxResult defaultResult, CustomMessageBoxOptions options)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult . More...
 
 CustomMessageBoxData (Window owner, object content, string caption, MessageBoxButton buttons, MessageBoxImage icon, MessageBoxResult defaultResult, MessageBoxOptions options)
 Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult . More...
 
 CustomMessageBoxData (object content)
 Creates a new CustomMessageBoxData instance without specifying any parameters. More...
 
 CustomMessageBoxData (object content, string caption)
 Creates a new CustomMessageBoxData instance without specifying any parameters. More...
 
 CustomMessageBoxData (object content, string caption, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons . More...
 
 CustomMessageBoxData (object content, string caption, ImageSource icon, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxImage icon, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified content , caption , icon , and buttons . More...
 
 CustomMessageBoxData (object content, string caption, CustomMessageBoxButton? defaultResult, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons . More...
 
 CustomMessageBoxData (object content, string caption, ImageSource icon, CustomMessageBoxButton? defaultResult, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified content , caption , icon , and buttons . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxImage icon, CustomMessageBoxButton? defaultResult, params CustomMessageBoxButton?[] buttons)
 Creates a new CustomMessageBoxData instance with the specified content , caption , icon , and buttons . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxButton buttons)
 Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxButton buttons, ImageSource icon)
 Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , and icon . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxButton buttons, ImageSource icon, MessageBoxResult defaultResult)
 Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxButton buttons, MessageBoxImage icon)
 Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , and icon . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxButton buttons, MessageBoxImage icon, MessageBoxResult defaultResult)
 Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxButton buttons, MessageBoxImage icon, MessageBoxResult defaultResult, CustomMessageBoxOptions options)
 Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult . More...
 
 CustomMessageBoxData (object content, string caption, MessageBoxButton buttons, MessageBoxImage icon, MessageBoxResult defaultResult, MessageBoxOptions options)
 Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult . More...
 

Properties

CustomMessageBoxStyle Appearance = CustomMessageBoxStyle.Default [get, set]
 Gets or sets the CustomMessageBoxStyle instance that defines the appearance & layout of the CustomMessageBox. More...
 
Window? Owner [get, set]
 Gets the owner window. More...
 
string? Message [get, set]
 Gets or sets the message string to display in the CustomMessageBox. More...
 
object? Content [get, set]
 Gets or sets the extra content (such as controls) to display in the CustomMessageBox. More...
 
string Title = string.Empty [get, set]
 Gets or sets the title of the CustomMessageBox window. More...
 
bool ShowCaptionBar = true [get, set]
 Gets or sets whether the caption bar is visible or not. More...
 
ImageSource? Icon [get, set]
 Gets or sets the icon to display in the CustomMessageBox window. More...
 
ObservableCollection< CustomMessageBoxButtonButtons = new() [get]
 Gets or sets the buttons to show in the CustomMessageBox window. More...
 
MessageBoxButton? MessageBoxButton [get, set]
 Gets or sets the buttons to show in the CustomMessageBox window, as a legacy enum value. More...
 
CustomMessageBoxButtonDefaultResult [get, set]
 Gets or sets the default button for the CustomMessageBox. More...
 
CustomMessageBoxButtonResult [get]
 Gets the button that the user pressed. More...
 
CustomMessageBoxOptions Options [get, set]
 Gets or sets the special display options for the CustomMessageBox. More...
 
MessageBoxOptions MessageBoxOptions [get, set]
 Gets or sets the special display options for the CustomMessageBox as the legacy enum type. More...
 
bool EnableEscapeKey = false [get, set]
 Gets or sets whether pressing the Escape key will close the window (with the default result) or not. Defaults to false. More...
 

Events

PropertyChangedEventHandler? PropertyChanged
 

Detailed Description

Data model for CustomMessageBox windows.

Constructor & Destructor Documentation

◆ CustomMessageBoxData() [1/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( )

Creates a new CustomMessageBoxData instance without specifying any parameters.

◆ CustomMessageBoxData() [2/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner)

Creates a new CustomMessageBoxData instance with the specified owner .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.

◆ CustomMessageBoxData() [3/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content 
)

Creates a new CustomMessageBoxData instance with the specified owner and content .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.

◆ CustomMessageBoxData() [4/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , and caption .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.

◆ CustomMessageBoxData() [5/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , and buttons .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [6/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
ImageSource  icon,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [7/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxImage  icon,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [8/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
CustomMessageBoxButton defaultResult,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , and buttons .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
defaultResultThe default result of the messagebox. This can be a string, char, MessageBoxResult, or CustomMessageBoxButton, but it must match the Name of one of the specified buttons or an ArgumentOutOfRangeException is thrown. It does not have to be the same instance.
buttonsThe buttons to display in the window.
Exceptions
ArgumentOutOfRangeExceptionThe specified defaultResult didn't match any of the buttons .

◆ CustomMessageBoxData() [9/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
ImageSource  icon,
CustomMessageBoxButton defaultResult,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox. This can be a string, char, MessageBoxResult, or CustomMessageBoxButton, but it must match the Name of one of the specified buttons or an ArgumentOutOfRangeException is thrown. It does not have to be the same instance.
buttonsThe buttons to display in the window.
Exceptions
ArgumentOutOfRangeExceptionThe specified defaultResult didn't match any of the buttons .

◆ CustomMessageBoxData() [10/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxImage  icon,
CustomMessageBoxButton defaultResult,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , icon , and buttons .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox. This can be a string, char, MessageBoxResult, or CustomMessageBoxButton, but it must match the Name of one of the specified buttons or an ArgumentOutOfRangeException is thrown. It does not have to be the same instance.
buttonsThe buttons to display in the window.
Exceptions
ArgumentOutOfRangeExceptionThe specified defaultResult didn't match any of the buttons .

◆ CustomMessageBoxData() [11/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxButton  buttons 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , and buttons .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [12/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxButton  buttons,
ImageSource  icon 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , and icon .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.

◆ CustomMessageBoxData() [13/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxButton  buttons,
ImageSource  icon,
MessageBoxResult  defaultResult 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.

◆ CustomMessageBoxData() [14/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , and icon .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.

◆ CustomMessageBoxData() [15/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon,
MessageBoxResult  defaultResult 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.

◆ CustomMessageBoxData() [16/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon,
MessageBoxResult  defaultResult,
CustomMessageBoxOptions  options 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.
optionsSpecifies special display options for the CustomMessageBox window.

◆ CustomMessageBoxData() [17/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( Window  owner,
object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon,
MessageBoxResult  defaultResult,
MessageBoxOptions  options 
)

Creates a new CustomMessageBoxData instance with the specified owner , content , caption , buttons , icon , and defaultResult .

Parameters
ownerThe Window to set as the owner of the CustomMessageBox dialog window.
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.
optionsSpecifies special display options for the CustomMessageBox window. MessageBoxOptions.DefaultDesktopOnly & MessageBoxOptions.ServiceNotification are not supported.

◆ CustomMessageBoxData() [18/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content)

Creates a new CustomMessageBoxData instance without specifying any parameters.

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.

◆ CustomMessageBoxData() [19/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption 
)

Creates a new CustomMessageBoxData instance without specifying any parameters.

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.

◆ CustomMessageBoxData() [20/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [21/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
ImageSource  icon,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [22/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxImage  icon,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , icon , and buttons .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [23/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
CustomMessageBoxButton defaultResult,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
defaultResultThe default result of the messagebox. This can be a string, char, MessageBoxResult, or CustomMessageBoxButton, but it must match the Name of one of the specified buttons or an ArgumentOutOfRangeException is thrown. It does not have to be the same instance.
buttonsThe buttons to display in the window.
Exceptions
ArgumentOutOfRangeExceptionThe specified defaultResult didn't match any of the buttons .

◆ CustomMessageBoxData() [24/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
ImageSource  icon,
CustomMessageBoxButton defaultResult,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , icon , and buttons .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox. This can be a string, char, MessageBoxResult, or CustomMessageBoxButton, but it must match the Name of one of the specified buttons or an ArgumentOutOfRangeException is thrown. It does not have to be the same instance.
buttonsThe buttons to display in the window.
Exceptions
ArgumentOutOfRangeExceptionThe specified defaultResult didn't match any of the buttons .

◆ CustomMessageBoxData() [25/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxImage  icon,
CustomMessageBoxButton defaultResult,
params CustomMessageBoxButton?[]  buttons 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , icon , and buttons .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox. This can be a string, char, MessageBoxResult, or CustomMessageBoxButton, but it must match the Name of one of the specified buttons or an ArgumentOutOfRangeException is thrown. It does not have to be the same instance.
buttonsThe buttons to display in the window.
Exceptions
ArgumentOutOfRangeExceptionThe specified defaultResult didn't match any of the buttons .

◆ CustomMessageBoxData() [26/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxButton  buttons 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , and buttons .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.

◆ CustomMessageBoxData() [27/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxButton  buttons,
ImageSource  icon 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , and icon .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.

◆ CustomMessageBoxData() [28/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxButton  buttons,
ImageSource  icon,
MessageBoxResult  defaultResult 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.

◆ CustomMessageBoxData() [29/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , and icon .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.

◆ CustomMessageBoxData() [30/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon,
MessageBoxResult  defaultResult 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.

◆ CustomMessageBoxData() [31/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon,
MessageBoxResult  defaultResult,
CustomMessageBoxOptions  options 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.
optionsSpecifies special display options for the CustomMessageBox window.

◆ CustomMessageBoxData() [32/32]

VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.CustomMessageBoxData ( object  content,
string  caption,
MessageBoxButton  buttons,
MessageBoxImage  icon,
MessageBoxResult  defaultResult,
MessageBoxOptions  options 
)

Creates a new CustomMessageBoxData instance with the specified content , caption , buttons , icon , and defaultResult .

Parameters
contentThe content to display in the message box. This can be any type, including string & System.Windows.Controls.Control.
When a string is specified, the Message property is set instead of the Content property.
captionThe title of the window.
buttonsThe buttons to display in the window.
iconThe icon to display in the window.
defaultResultThe default result of the messagebox.
optionsSpecifies special display options for the CustomMessageBox window. MessageBoxOptions.DefaultDesktopOnly & MessageBoxOptions.ServiceNotification are not supported.

Property Documentation

◆ Appearance

CustomMessageBoxStyle VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Appearance = CustomMessageBoxStyle.Default
getset

Gets or sets the CustomMessageBoxStyle instance that defines the appearance & layout of the CustomMessageBox.

Referenced by VolumeControl.WPF.CustomMessageBox.CustomMessageBox.Show().

◆ Buttons

ObservableCollection<CustomMessageBoxButton> VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Buttons = new()
get

Gets or sets the buttons to show in the CustomMessageBox window.

◆ Content

object? VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Content
getset

Gets or sets the extra content (such as controls) to display in the CustomMessageBox.

This can be specified at the same time as the Content property.

◆ DefaultResult

CustomMessageBoxButton? VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.DefaultResult
getset

Gets or sets the default button for the CustomMessageBox.

◆ EnableEscapeKey

bool VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.EnableEscapeKey = false
getset

Gets or sets whether pressing the Escape key will close the window (with the default result) or not. Defaults to false.

◆ Icon

ImageSource? VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Icon
getset

Gets or sets the icon to display in the CustomMessageBox window.

◆ Message

string? VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Message
getset

Gets or sets the message string to display in the CustomMessageBox.

This can be specified at the same time as the Content property.

◆ MessageBoxButton

MessageBoxButton? VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.MessageBoxButton
getset

Gets or sets the buttons to show in the CustomMessageBox window, as a legacy enum value.

Setting this will overwrite the Buttons if there are any.

◆ MessageBoxOptions

MessageBoxOptions VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.MessageBoxOptions
getset

Gets or sets the special display options for the CustomMessageBox as the legacy enum type.

MessageBoxOptions.DefaultDesktopOnly & MessageBoxOptions.ServiceNotification are not supported and will trigger an InvalidOperationException if you attempt to set them.

Exceptions
InvalidOperationExceptionThe specified value included MessageBoxOptions.DefaultDesktopOnly and/or MessageBoxOptions.ServiceNotification, which are not supported.

◆ Options

CustomMessageBoxOptions VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Options
getset

Gets or sets the special display options for the CustomMessageBox.

◆ Owner

Window? VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Owner
getset

Gets the owner window.

◆ Result

CustomMessageBoxButton? VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Result
get

Gets the button that the user pressed.

Returns
The CustomMessageBoxButton instance that was clicked by the user, or null if the user didn't click a button.

◆ ShowCaptionBar

bool VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.ShowCaptionBar = true
getset

Gets or sets whether the caption bar is visible or not.

When false, the Title & Icon properties are ignored. The close button will not be visible either.

◆ Title

string VolumeControl.WPF.CustomMessageBox.CustomMessageBoxData.Title = string.Empty
getset

Gets or sets the title of the CustomMessageBox window.


The documentation for this class was generated from the following file: