Skip to main content
.NET 6.0+

AppearanceController.RegisterController(ISupportRefreshItemsAppearance) Method

Registers a Controller to refresh the conditional appearance of its UI elements in common scenarios.

Namespace: DevExpress.ExpressApp.ConditionalAppearance

Assembly: DevExpress.ExpressApp.ConditionalAppearance.v23.2.dll

Declaration

public void RegisterController(
    ISupportRefreshItemsAppearance controller
)

Parameters

Name Type Description
controller DevExpress.ExpressApp.ConditionalAppearance.ISupportRefreshItemsAppearance

A Controller implementing the ISupportRefreshItemsAppearance interface.

Remarks

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:

  • ActionAppearanceController

    Refreshes the conditional appearance of the Actions activated for the current View.

  • DetailViewItemAppearanceController

    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.

  • DetailViewLayoutItemAppearanceController

    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.

See Also