Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Collapse]Task-Based Help
  [Expand]Business Model Design
  [Collapse]Application Model
    How to: Allow an Administrator to Create Custom Persistent Fields in an XPO-Based Application
    How to: Apply Application Model Changes to the Current View Immediately
    How to: Apply HTML Formatting to Windows Forms XAF UI Elements
    How to: Create Additional ListView Nodes in Code using a Generator Updater
    How to: Enable the Administrative UI for managing Users' Model Differences
    How to: Extend the Application Model
    How to: Merge End-User Customizations into the XAF Solution
    How to: Store the Application Model Differences in the Database
  [Expand]Actions
  [Expand]Navigation
  [Expand]Views
  [Expand]List Editors
  [Expand]Property Editors
  [Expand]Templates
  [Expand]Filtering
  [Expand]Reporting
  [Expand]Dashboards
  [Expand]Scheduler and Notifications
  [Expand]Maps
  [Expand]Security
  [Expand]Workflow
  [Expand]Localization
  [Expand]Testing
  [Expand]Miscellaneous UI Customizations
 [Expand]Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
[Expand]End-User Documentation

How to: Apply HTML Formatting to Windows Forms XAF UI Elements

To construct a Windows Forms UI, XAF uses controls from the XtraEditors Suite. XAF supports the capability of certain controls from this Suite to format the display text using Hyper Text Markup Language (HTML). This document lists what XAF UI elements support HTML formatting, and provides you with the examples of using this feature.

The following XAF UI elements support HTML Formatting:

  • Static Text View Item's text.
  • Property Editor's captions in Detail Views.
  • Column captions of the Windows Forms GridListEditor.
    By default, XAF uses this List Editor to visualize List Views in Windows Forms applications.

XAF allows these elements to be customized via the associated properties of the Application Model.

For the complete list of supported HTML tags, see HTML Text Formatting.

The HTML formatting feature can be enabled or disabled via the IModelOptionsEnableHtmlFormatting.EnableHtmlFormatting property of the Application Model's Options node.

 

The following examples demonstrate how to apply HTML formatting to different UI elements. These examples are performed over the Main Demo supplied with XAF. The Main Demo can be found in your %PUBLIC%\Documents\DevExpress Demos 17.1\Components\eXpressApp Framework\MainDemo folder.

Expanded Static Text View Item's Text

Set the Text property of the Application Model's Views | AuthenticationStandardLogonParameters_DetailView | Items | LogonText node to the following value:

<color=green>Welcome! Please enter your user name and password below.</color>

The following image shows the resulting log on window:

Expanded Property Editor's Caption

Set the Caption property of the Application Model's Views | Contact_DetailView | Items | WebPageAddress node to the following value:

<size=12><color=red><b>Web </b><color=0,255,0><i>Page </i><color=#0000FF><u>Address</u></color></size>

The following image shows part of the resulting Contact Detail View:

Expanded Column's Caption of the Default List Editor

Set the Caption property of the Application Model's Views | Contact_ListView | Columns | LastName node to the following value:

<size=10><color=#CFCAFF><size=+4>L<color=#B0A8FF><size=+4>A<color=#6F79FF><size=+4>S<color=#4D3EFF><size=+4>T <color=#4D3EFF><size=-4>N<color=#6F79FF><size=-4>A<color=#B0A8FF><size=-4>M<color=#CFCAFF><size=-4>E</color></size>

The following image shows the resulting Contact List View:

Expanded See Also

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