Skip to main content
.NET 8.0+

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

StaticText Class

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

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v25.1.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public abstract class StaticText :
    ViewItem,
    IAppearanceFormat,
    IAppearanceBase,
    IAppearanceVisibility,
    INotifyAppearanceVisibilityChanged

#Remarks

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 Web Forms applications.
StaticTextViewItem (DevExpress.ExpressApp.Blazor.Editors) The Static Text View Item used in XAF ASP.NET Core Blazor 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 more information, refer to the Add an Unbound Control (Button) to the Form Layout in an XAF View topic and ViewItem class description. Note that a custom Static Text View Item should be implemented in a platform-specific application project. This View Item is loaded into the Application Model and is available for use in the UI.

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.

See the following topic for information on how to implement a Static Text View Item: How to: Implement a View Item.

See Also