Skip to content

DevExpress-Examples/wpf-spreadsheet-how-to-create-a-custom-message-box-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF Spreadsheet - How to customize a message dialog displayed when a runtime error occurs

This example demonstrates how to display a custom message in place of the default user warning dialog box.

Implementation Details

Create a class that implements the IMessageBox service and use the SpreadsheetControl.ReplaceService method to register this class in place of the default service. Note that due to WPF Spreadsheet implementation specifics, it is necessary to replace the built-in service after the control is completely loaded.

The IMessageBox service provides the ShowMessage, ShowOkCancelMessage, ShowYesNoCancelMessage, ShowYesNoMessage, and ShowDataValidationDialog methods that are called when the SpreadsheetControl needs user attention.

Files to Review

CS VB
MainWindow.xaml MainWindow.xaml
MainWindow.xaml.cs MainWindow.xaml.vb
MyMessageBoxService.cs MyMessageBoxService.vb

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Вisplay a custom message in place of the default user warning dialog box.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5