Skip to main content
.NET Framework 4.5.2+

XafApplication.CustomizeFormattingCulture Event

Occurs after a formatting culture has been set internally.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v22.2.dll

NuGet Package: DevExpress.ExpressApp


public event EventHandler<CustomizeFormattingCultureEventArgs> CustomizeFormattingCulture

Event Data

The CustomizeFormattingCulture event's data class is CustomizeFormattingCultureEventArgs. The following properties provide information specific to this event:

Property Description
FormattingCulture Specifies the culture currently set for the application.
PreferredLanguageName Specifies the language currently set for the Application Model‘s IModelApplication.PreferredLanguage property.
UserLanguageName Specifies the language which is set in the user’s operating system or passed by the Internet browser.


In XAF applications, formatting options for information like currency, numbers, and dates are not related to the application’s language. The formatting options that are set in the current user’s operating system or passed by the Internet browser are used. Handle this event to set the required formatting culture for the Thread.CurrentCulture object. To get the culture currently set, use the handler’s CustomizeFormattingCultureEventArgs.FormattingCulture property. In addition, you can get the language which is set in the user’s operating system or passed by the Internet browser. For this purpose, use the handler’s CustomizeFormattingCultureEventArgs.UserLanguageName property. To get the language which is currently set for the IModelApplication node’s IModelApplication.PreferredLanguage property, use the handler’s CustomizeFormattingCultureEventArgs.PreferredLanguageName property.

To see an example of handling this event, refer to the Culture-Specific Formatting topic.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomizeFormattingCulture event.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also