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.
Static |
Description |
---|---|
Static |
The Static Text View Item used in XAF Windows Forms applications. |
Static |
The Static Text View Item used in XAF ASP. |
Static |
The Static Text View Item used in XAF ASP. |
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.