Occurs before the conditional appearance is applied to the target UI element.
public event EventHandler<ApplyAppearanceEventArgs> CustomApplyAppearance
Public Event CustomApplyAppearance As EventHandler(Of ApplyAppearanceEventArgs)
The CustomApplyAppearance event handler receives an argument of the ApplyAppearanceEventArgs type. The following properties provide information specific to this event.
|AppearanceItems||Gets the list of resulting items that were calculated by each appearance rule.|
|AppearanceObject||The appearance that is currently applied to the target UI element.|
|ContextObjects||An object(s) to whose property a conditional appearance is currently applied. If the target item is an Action, it's the selected object(s) of the current View.|
|EvaluatorContextDescriptor||Gets the EvaluatorContextDescriptor object that is used to supply metadata on the specified type to the ExpressionEvaluator objects.|
|Item||A UI element whose appearance is about to be refreshed by applying the appropriate conditional appearance rules.|
|ItemName||The name of the UI element whose appearance is about to be refreshed by applying conditional appearance rules.|
|ItemType||The type of the UI element whose appearance is about to be refreshed by applying conditional appearance rules.|
|View||Obsolete. Gets the current View.|
|ViewInfo||Gets the information related to the current View.|
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.
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:
Supported Appearance types
Provides access to the arguments of the GridView.RowCellStyle event handled by the GridListEditor. To access the row cell or its appearance settings, use the RowCellStyleEventArgs object returned by the adapter's Data property.
Provides access to the arguments of the TreeList.NodeCellStyle event handled by the TreeListEditor. To access the node cell or its appearance settings, use the GetCustomNodeCellStyleEventArgs object returned by the adapter's Data property.
Provides access to the arguments of the ASPxGridView.HtmlDataCellPrepared event handled by the ASPxGridListEditor. To access the row cell or its appearance settings, use the ASPxGridViewTableDataCellEventArgs object returned by the adapter's Data property.
GridViewRowCellStyleEventArgsAppearanceAdapter, GridViewCancelEventArgsAppearanceAdapter, GridViewCancelEventArgsAppearanceAdapterWithReset
Provides access to the arguments of the ASPxGridView.HtmlRowPrepared event handled by the ASPxGridListEditor. To access the row or its appearance settings, use the ASPxGridViewTableRowEventArgs object returned by the adapter's Data property.
Provides access to a LayoutItemTemplateContainer, LayoutGroupTemplateContainer or TabbedGroupTemplateContainer when it's processed by the WebLayoutManager and when the AppearanceController.Refresh method is invoked. To access a container and its control, use the adapter's Data property.
Provides access to a XAFLayoutItemInfo object representing a layout item or group when it's created by the WinLayoutManager and when the AppearanceController.Refresh method is invoked. To access the XAFLayoutItemInfo object, use the adapter's Data property.
The conditional appearance is applied to Static Text detail view items when their controls are created and when the AppearanceController.Refresh method is invoked.
The conditional appearance is applied to ActionAppearanceItems when the AppearanceController.Refresh method is invoked. To access the affected Action, use the ActionAppearanceItem's Data property.
Refer to the How to: Customize the Conditional Appearance Module Behavior topic to see an example of handling this event.
Instead of directly accessing the editor's control, you can customize the appearance object. Iterate through the ApplyAppearanceEventArgs.AppearanceItems list to select the required item.