Log In
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Collapse]eXpressApp Framework
 [Expand]Getting Started
  [Expand]Application Solution Components
   Client-Side Mobile Application
  [Expand]Business Model Design
  [Expand]Application Model
  [Collapse]UI Construction
    UI Element Overview
    Windows and Frames
    Action Containers
   [Expand]View Items
    List Editors
    Add and Override Images
    Text Notifications
    Ways to Show a Confirmation Dialog
    ASP.NET Web Application Appearance
    Application Personalization
    Using a Custom Control that is not Integrated by Default
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Task-Based Help
  Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Text Notifications

In ASP.NET and WinForms XAF applications, you can display a message box with a detailed notification text using the ShowViewStrategyBase.ShowMessage method.

Expanded DevExpress Components and Widgets Used to Show Notifications

XAF uses the DevExpress WinForms and DevExtream components and widgets to show the notifications for WinForms and ASP.NET applications.

WinForms Notifications:

You can choose one of the three available notification types listed in the WinMessageType enumeration for a WinForms application:

ASP.NET Notifications:

Notifications are displayed using the DevExtreme dxToast widget.

Expanded Using Text Notifications

A "Success" message should show once the platform-independent markCompletedAction updates tasks, as illustrated in the SimpleProjectManager demo (this demo is installed in %PUBLIC%\Documents\DevExpress Demos 17.2\Components\eXpressApp Framework\SimpleProjectManager by default). Also, the task's Detail View should display within a pop-up window invoked on the OK message button click. For this purpose, the ShowMessage method with the MessageOptions parameter is used. The MessageOptions class contains both the platform-agnostic and platform-specific settings of a text notification. The code snippet below demonstrates the example of implementing this approach:

See the result in the images below.

WinForms application:

ASP.NET application:


  • The Toast Notifications Manager requires an application shortcut pinned to the Windows 10 start screen to display Toast notifications correctly. Please refer to the Quickstart: Sending a toast notification from the desktop article to learn more. Once you do this, you need to customize the ToastNotificationsManager instance according to the Toast Notification Manager article. Use the DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CustomizeToastNotificationsManager event to access the instance.
  • In ASP.NET applications, notifications can be shown only on postbacks and callbacks initiated by the XAF RaiseXafCallback method and processed by the XafCallbackManager. This does not work on callbacks initiated by a control, such as a grid sorting callback.

Expanded Notifications Customization

  • Use the WinShowViewStrategyBase class's CustomGetImage event to change the default image on the WinForms notifications displayed with the Toast or Alert control:

  • Use the WinShowViewStrategyBase class's CustomGetFlyoutBackColor event to change the Flyout Dialog's color:

  • Use the WinShowViewStrategyBase class's CustomizeAlertControl event to customize the Alert control:

  • Use the WinShowViewStrategyBase class's CustomizeToastNotificationsManager to access the Toast Notification Manager instance:

Expanded Notification Button Caption Localization

You can localize the notification button captions using the Model Editor. Navigate to the Localization | DialogButtons node, choose the OK or Cancel node and set a particular string to the Value property. Note that this setting also applies to other dialog buttons.

How would you rate this topic?​​​​​​​