C# Class Xceed.Wpf.Toolkit.MessageBox

Inheritance: System.Windows.Controls.Control
Afficher le fichier Open project: Gainedge/BetterExplorer Class Usage Examples

Méthodes publiques

Свойство Type Description
ButtonRegionBackgroundProperty System.Windows.DependencyProperty
CancelButtonContentProperty System.Windows.DependencyProperty
CancelButtonStyleProperty System.Windows.DependencyProperty
ImageSourceProperty System.Windows.DependencyProperty
NoButtonContentProperty System.Windows.DependencyProperty
NoButtonStyleProperty System.Windows.DependencyProperty
OkButtonContentProperty System.Windows.DependencyProperty
OkButtonStyleProperty System.Windows.DependencyProperty
TextProperty System.Windows.DependencyProperty
YesButtonContentProperty System.Windows.DependencyProperty
YesButtonStyleProperty System.Windows.DependencyProperty

Private Properties

Свойство Type Description
Button_Click void
Close void
CreateContainer System.Windows.Window
ExecuteCopy void
GetDefaultButton System.Windows.Controls.Button
GetDefaultButtonFromDefaultResult System.Windows.Controls.Button
GetMessageBoxButton System.Windows.Controls.Button
InitHandlers void
IsCurrentWindow bool
MessageBox System
OnClose void
OnContainerClosed void
SetDefaultResult void
SetImageSource void
ShowCore MessageBoxResult
ShowMessageBoxCore void
UpdateBlockMouseInputsPanel void

Méthodes publiques

Méthode Description
OnApplyTemplate ( ) : void

Overrides the OnApplyTemplate method.

Show ( Window owner, string messageText ) : MessageBoxResult

Displays a message box that has a message and that returns a result.

Show ( Window owner, string messageText, string caption ) : MessageBoxResult
Show ( Window owner, string messageText, string caption, MessageBoxButton button ) : MessageBoxResult
Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon ) : MessageBoxResult
Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult
Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, System.Windows.Style messageBoxStyle ) : MessageBoxResult
Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, System.Windows.Style messageBoxStyle ) : MessageBoxResult
Show ( Window owner, string messageText, string caption, MessageBoxButton button, System.Windows.Style messageBoxStyle ) : MessageBoxResult
Show ( Window owner, string messageText, string caption, System.Windows.Style messageBoxStyle ) : MessageBoxResult
Show ( string messageText ) : MessageBoxResult

Displays a message box that has a message and that returns a result.

Show ( string messageText, string caption ) : MessageBoxResult

Displays a message box that has a message and title bar caption; and that returns a result.

Show ( string messageText, string caption, MessageBoxButton button ) : MessageBoxResult
Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon ) : MessageBoxResult
Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult
Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, System.Windows.Style messageBoxStyle ) : MessageBoxResult

Displays a message box that has a message and that returns a result.

Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, System.Windows.Style messageBoxStyle ) : MessageBoxResult

Displays a message box that has a message and that returns a result.

Show ( string messageText, string caption, MessageBoxButton button, System.Windows.Style messageBoxStyle ) : MessageBoxResult

Displays a message box that has a message and that returns a result.

ShowDialog ( ) : bool?

Display the MessageBox window and returns only when this MessageBox closes.

ShowMessageBox ( ) : void

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.

ShowMessageBox ( string messageText ) : void

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.

ShowMessageBox ( string messageText, string caption ) : void

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.

ShowMessageBox ( string messageText, string caption, MessageBoxButton button ) : void

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.

ShowMessageBox ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon ) : void

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.

ShowMessageBox ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : void

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.

Méthodes protégées

Méthode Description
ChangeVisualState ( string name, bool useTransitions ) : void

Changes the control's visual state(s).

InitializeMessageBox ( Window owner, string text, string caption, MessageBoxButton button, MessageBoxImage image, MessageBoxResult defaultResult ) : void

Initializes the MessageBox.

OnCloseButtonClicked ( RoutedEventArgs e ) : void

Processes the close button click.

OnClosed ( EventArgs e ) : void
OnCoerceCloseButtonVisibility ( Visibility newValue ) : object
OnCoerceWindowStyle ( WindowStyle newValue ) : object
OnHeaderDragDelta ( System.Windows.Controls.Primitives.DragDeltaEventArgs e ) : void

Processes the move of a drag operation on the header.

OnHeaderIconDoubleClicked ( MouseButtonEventArgs e ) : void

Processes the double-click on the header.

Private Methods

Méthode Description
Button_Click ( object sender, RoutedEventArgs e ) : void

Sets the MessageBoxResult according to the button pressed and then closes the MessageBox.

Close ( ) : void

Closes the MessageBox.

CreateContainer ( ) : Window

Creates the container which will host the MessageBox control.

ExecuteCopy ( object sender, ExecutedRoutedEventArgs e ) : void
GetDefaultButton ( ) : System.Windows.Controls.Button

Gets the default button.

Used when the _defaultResult is set to None

GetDefaultButtonFromDefaultResult ( ) : System.Windows.Controls.Button

Gets the default button from the _defaultResult.

GetMessageBoxButton ( string name ) : System.Windows.Controls.Button

Gets a message box button.

InitHandlers ( ) : void
IsCurrentWindow ( object windowtoTest ) : bool
MessageBox ( ) : System
OnClose ( ) : void
OnContainerClosed ( object sender, EventArgs e ) : void

Callack to the Container.Closed event

SetDefaultResult ( ) : void

Sets the button that represents the _defaultResult to the default button and gives it focus.

SetImageSource ( MessageBoxImage image ) : void

Sets the message image source.

ShowCore ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, System.Windows.Style messageBoxStyle ) : MessageBoxResult

Shows the MessageBox.

ShowMessageBoxCore ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : void
UpdateBlockMouseInputsPanel ( ) : void

Method Details

ChangeVisualState() protected méthode

Changes the control's visual state(s).
protected ChangeVisualState ( string name, bool useTransitions ) : void
name string name of the state
useTransitions bool True if state transitions should be used.
Résultat void

InitializeMessageBox() protected méthode

Initializes the MessageBox.
protected InitializeMessageBox ( Window owner, string text, string caption, MessageBoxButton button, MessageBoxImage image, MessageBoxResult defaultResult ) : void
owner System.Windows.Window
text string The text.
caption string The caption.
button MessageBoxButton The button.
image MessageBoxImage The image.
defaultResult MessageBoxResult
Résultat void

OnApplyTemplate() public méthode

Overrides the OnApplyTemplate method.
public OnApplyTemplate ( ) : void
Résultat void

OnCloseButtonClicked() protected méthode

Processes the close button click.
protected OnCloseButtonClicked ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs The instance containing the event data.
Résultat void

OnClosed() protected méthode

protected OnClosed ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnCoerceCloseButtonVisibility() protected méthode

protected OnCoerceCloseButtonVisibility ( Visibility newValue ) : object
newValue Visibility
Résultat object

OnCoerceWindowStyle() protected méthode

protected OnCoerceWindowStyle ( WindowStyle newValue ) : object
newValue WindowStyle
Résultat object

OnHeaderDragDelta() protected méthode

Processes the move of a drag operation on the header.
protected OnHeaderDragDelta ( System.Windows.Controls.Primitives.DragDeltaEventArgs e ) : void
e System.Windows.Controls.Primitives.DragDeltaEventArgs The instance containing the event data.
Résultat void

OnHeaderIconDoubleClicked() protected méthode

Processes the double-click on the header.
protected OnHeaderIconDoubleClicked ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs The instance containing the event data.
Résultat void

Show() public static méthode

Displays a message box that has a message and that returns a result.
public static Show ( Window owner, string messageText ) : MessageBoxResult
owner System.Windows.Window A System.Windows.Window that represents the owner of the MessageBox
messageText string A System.String that specifies the text to display.
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption, MessageBoxButton button ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
button MessageBoxButton
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
defaultResult MessageBoxResult
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, System.Windows.Style messageBoxStyle ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
defaultResult MessageBoxResult
messageBoxStyle System.Windows.Style
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, System.Windows.Style messageBoxStyle ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
messageBoxStyle System.Windows.Style
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption, MessageBoxButton button, System.Windows.Style messageBoxStyle ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
button MessageBoxButton
messageBoxStyle System.Windows.Style
Résultat MessageBoxResult

Show() public static méthode

public static Show ( Window owner, string messageText, string caption, System.Windows.Style messageBoxStyle ) : MessageBoxResult
owner System.Windows.Window
messageText string
caption string
messageBoxStyle System.Windows.Style
Résultat MessageBoxResult

Show() public static méthode

Displays a message box that has a message and that returns a result.
public static Show ( string messageText ) : MessageBoxResult
messageText string A System.String that specifies the text to display.
Résultat MessageBoxResult

Show() public static méthode

Displays a message box that has a message and title bar caption; and that returns a result.
public static Show ( string messageText, string caption ) : MessageBoxResult
messageText string A System.String that specifies the text to display.
caption string A System.String that specifies the title bar caption to display.
Résultat MessageBoxResult

Show() public static méthode

public static Show ( string messageText, string caption, MessageBoxButton button ) : MessageBoxResult
messageText string
caption string
button MessageBoxButton
Résultat MessageBoxResult

Show() public static méthode

public static Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon ) : MessageBoxResult
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
Résultat MessageBoxResult

Show() public static méthode

public static Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : MessageBoxResult
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
defaultResult MessageBoxResult
Résultat MessageBoxResult

Show() public static méthode

Displays a message box that has a message and that returns a result.
public static Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, System.Windows.Style messageBoxStyle ) : MessageBoxResult
messageText string A System.String that specifies the text to display.
caption string A System.String that specifies the title bar caption to display.
button MessageBoxButton A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
icon MessageBoxImage
defaultResult MessageBoxResult A System.Windows.MessageBoxResult value that specifies the default result of the MessageBox.
messageBoxStyle System.Windows.Style A Style that will be applied to the MessageBox instance.
Résultat MessageBoxResult

Show() public static méthode

Displays a message box that has a message and that returns a result.
public static Show ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, System.Windows.Style messageBoxStyle ) : MessageBoxResult
messageText string A System.String that specifies the text to display.
caption string A System.String that specifies the title bar caption to display.
button MessageBoxButton A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
icon MessageBoxImage
messageBoxStyle System.Windows.Style A Style that will be applied to the MessageBox instance.
Résultat MessageBoxResult

Show() public static méthode

Displays a message box that has a message and that returns a result.
public static Show ( string messageText, string caption, MessageBoxButton button, System.Windows.Style messageBoxStyle ) : MessageBoxResult
messageText string A System.String that specifies the text to display.
caption string A System.String that specifies the title bar caption to display.
button MessageBoxButton A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
messageBoxStyle System.Windows.Style A Style that will be applied to the MessageBox instance.
Résultat MessageBoxResult

ShowDialog() public méthode

Display the MessageBox window and returns only when this MessageBox closes.
public ShowDialog ( ) : bool?
Résultat bool?

ShowMessageBox() public méthode

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
public ShowMessageBox ( ) : void
Résultat void

ShowMessageBox() public méthode

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
public ShowMessageBox ( string messageText ) : void
messageText string
Résultat void

ShowMessageBox() public méthode

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
public ShowMessageBox ( string messageText, string caption ) : void
messageText string
caption string
Résultat void

ShowMessageBox() public méthode

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
public ShowMessageBox ( string messageText, string caption, MessageBoxButton button ) : void
messageText string
caption string
button MessageBoxButton
Résultat void

ShowMessageBox() public méthode

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
public ShowMessageBox ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon ) : void
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
Résultat void

ShowMessageBox() public méthode

Displays this message box when embedded in a WindowContainer parent. Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
public ShowMessageBox ( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult ) : void
messageText string
caption string
button MessageBoxButton
icon MessageBoxImage
defaultResult MessageBoxResult
Résultat void

Property Details

ButtonRegionBackgroundProperty public_oe static_oe property

public static DependencyProperty,System.Windows ButtonRegionBackgroundProperty
Résultat System.Windows.DependencyProperty

CancelButtonContentProperty public_oe static_oe property

public static DependencyProperty,System.Windows CancelButtonContentProperty
Résultat System.Windows.DependencyProperty

CancelButtonStyleProperty public_oe static_oe property

public static DependencyProperty,System.Windows CancelButtonStyleProperty
Résultat System.Windows.DependencyProperty

ImageSourceProperty public_oe static_oe property

public static DependencyProperty,System.Windows ImageSourceProperty
Résultat System.Windows.DependencyProperty

NoButtonContentProperty public_oe static_oe property

public static DependencyProperty,System.Windows NoButtonContentProperty
Résultat System.Windows.DependencyProperty

NoButtonStyleProperty public_oe static_oe property

public static DependencyProperty,System.Windows NoButtonStyleProperty
Résultat System.Windows.DependencyProperty

OkButtonContentProperty public_oe static_oe property

public static DependencyProperty,System.Windows OkButtonContentProperty
Résultat System.Windows.DependencyProperty

OkButtonStyleProperty public_oe static_oe property

public static DependencyProperty,System.Windows OkButtonStyleProperty
Résultat System.Windows.DependencyProperty

TextProperty public_oe static_oe property

public static DependencyProperty,System.Windows TextProperty
Résultat System.Windows.DependencyProperty

YesButtonContentProperty public_oe static_oe property

public static DependencyProperty,System.Windows YesButtonContentProperty
Résultat System.Windows.DependencyProperty

YesButtonStyleProperty public_oe static_oe property

public static DependencyProperty,System.Windows YesButtonStyleProperty
Résultat System.Windows.DependencyProperty