AppearanceController.CustomApplyAppearance Event
Occurs before the conditional appearance is applied to the target UI element.
Namespace: DevExpress.ExpressApp.ConditionalAppearance
Assembly: DevExpress.ExpressApp.ConditionalAppearance.v24.2.dll
NuGet Package: DevExpress.ExpressApp.ConditionalAppearance
#Declaration
public event EventHandler<ApplyAppearanceEventArgs> CustomApplyAppearance
#Event Data
The CustomApplyAppearance event's data class is ApplyAppearanceEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Appearance |
Gets the list of resulting items that were calculated by each appearance rule. |
Appearance |
The appearance that is currently applied to the target UI element. |
Context |
An object |
Evaluator |
Gets the Evaluator |
Handled |
Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
Inherited from Handled |
Item | A UI element whose appearance is about to be refreshed by applying the appropriate conditional appearance rules. |
Item |
The name of the UI element whose appearance is about to be refreshed by applying conditional appearance rules. |
Item |
The type of the UI element whose appearance is about to be refreshed by applying conditional appearance rules. |
View | Obsolete. Gets the current View. |
View |
Gets the information related to the current View. |
#Remarks
This event is raised by the AppearanceController.RefreshItemAppearance method. The resulting appearance to be applied is represented by an AppearanceObject. You can access and customize this object in the CustomApplyAppearance event handler, using the ApplyAppearanceEventArgs.AppearanceObject parameter. To determine to which item and in which context the conditional appearance is going to be currently applied, use the event handler’s ApplyAppearanceEventArgs.Item, ApplyAppearanceEventArgs.ItemName, ApplyAppearanceEventArgs.ItemType and ApplyAppearanceEventArgs.ContextObjects parameters.
Important
Set the Handled parameter to true if appearance settings are completely processed by your code. Assign false if you want to keep the default processing code. Note that in this case, the default processing code can override your changes.
To learn which item types may present as appearance items, see the following table:
Item | Description | Supported Appearance types |
---|---|---|
Appearance | Provides access to the arguments of the Grid Provides access to the arguments of the Tree | IAppearance |
Table | Provides access to a System. Provides access to the arguments of the ASPx | IAppearance |
Grid | Provides access to the Grid | IAppearance |
Node | Provides access to the Tree | IAppearance |
ASPx | Provides access to the arguments of the ASPx Provides access to the ASPx | IAppearance |
Web | Provides access to a Layout | IAppearance |
Win | Provides access to a XAFLayout | IAppearance |
DevExpress. | Represents a column in a Grid | IAppearance |
The conditional appearance is applied to all Property | IAppearance | |
The conditional appearance is applied to all DXProperty | IAppearance | |
The conditional appearance is applied to Static Text detail view items when their controls are created and when the Appearance | IAppearance | |
The conditional appearance is applied to all Web | IAppearance | |
Action | The conditional appearance is applied to Action | IAppearance |
Refer to the How to: Customize the Conditional Appearance Module Behavior topic to see an example of handling this event.
Note
Instead of directly accessing the editor’s control, you can customize the appearance object. Iterate through the Apply
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomApplyAppearance event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.