Registers a Controller to refresh the conditional appearance of its UI elements in common scenarios.
NuGet Package: DevExpress.ExpressApp.ConditionalAppearance
A Controller implementing the ISupportRefreshItemsAppearance interface.
While any Controller can call the AppearanceController.RefreshItemAppearance method when required, there are scenarios common to different UI element types when their conditional appearance must be refreshed. These scenarios are the following:
To refresh the required UI elements in the listed scenarios, do the following:
- Introduce a View Controller that implements the ISupportRefreshItemsAppearance interface.
- In the ISupportRefreshItemsAppearance.RefreshViewItemsAppearance method, call the AppearanceController.RefreshItemAppearance method for the required UI elements, passing them as the item parameter.
- Register your Controller in the Appearance Controller by calling the RegisterController method and passing your Controller as the controller parameter.
The Appearance Controller calls the ISupportRefreshItemsAppearance.RefreshViewItemsAppearance method of the registered Controllers in the AppearanceController.Refresh method. This method is invoked in the common scenarios listed above and when the Appearance Controller is activated. In addition, a registered Controller’s ISupportRefreshItemsAppearance.RefreshViewItemsAppearance method is called immediately after registration if this Controller is currently active.
Currently, the following built-in Controllers are registered:
Refreshes the conditional appearance of the Actions activated for the current View.
Refreshes the conditional appearance of the CompositeView.Items contained in the current Detail View. In addition to the common scenarios listed above, this Controller calls the AppearanceController.RefreshItemAppearance method when items are added and when their controls are created.
Refreshes the conditional appearance of the layout items, groups and tabs contained in the current Detail View. In addition to the common scenarios listed above, this Controller calls the AppearanceController.RefreshItemAppearance method when items, groups and tabs are created.
When the registered Controller is deactivated, remove it from the list of registered Controllers using the AppearanceController.UnRegisterController method.