A newer version of this page is available. Switch to the current version.

StaticText Class

An abstract class that serves as the base class for the Static Text View Items.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v19.1.dll


public abstract class StaticText :


A Static Text View Item is used to display a particular caption in a UI. The StaticText class is an abstract class from which all the Static Text View Items derive. The following table lists XAF’s built-in Static Text View Items.

StaticText Descendant Description
StaticTextViewItem (DevExpress.ExpressApp.Win.Editors) The Static Text View Item used in XAF Windows Forms applications.
StaticTextViewItem (DevExpress.ExpressApp.Web.Editors) The Static Text View Item used in XAF ASP.NET applications.
StaticTextViewItem (DevExpress.ExpressApp.Mobile.Editors) The Static Text View Item used in XAF Mobile applications.

To extend the built-in functionality and use a specific text-display control, you may need to implement a custom Static Text View Item. To do this, override the protected virtual CreateControlCore method, to instantiate the required control. Apply the ViewItemAttribute to the custom item, to make a new child node appear in the ViewItems node of the Application Model. For additional information, refer to the How to: Implement a View Item topic and ViewItem class description. Note, that a custom Static Text View Item should be implemented in a module project. In this instance, it will be loaded to the Application Model, and you will be able to use it in a UI. Additionally, the module should be UI-specific, because the custom Static Text View Item creates a UI-specific control.

The StaticText class implements the IAppearanceFormat interface so that the AppearanceController can change the appearance format according to conditional appearance rules applied to a StaticText View Item.

To learn how to add a Static Text View Item to a Detail View, refer to the View Items topic.

See Also