Skip to main content
.NET 6.0+

StaticText Class

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

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v23.2.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 additional information, refer to the Implement a View Item (WinForms) topic and ViewItem class description. Note, that a custom Static Text View Item should be implemented in a platform-specific module project. If your solution does not contain this project, add this View Item to an application project. This View Item will be loaded to the Application Model, and you will be able to use it in a 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