Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ChangeVariantController Class

Represents a ViewController descendant that contains the ChangeVariant Action.

Namespace: DevExpress.ExpressApp.ViewVariantsModule

Assembly: DevExpress.ExpressApp.ViewVariantsModule.v24.2.dll

#Declaration

public class ChangeVariantController :
    Controller,
    IFilterActionProvider

#Remarks

The ChangeVariantController is intended for presenting the ChangeVariant Action. This Action allows end-users to switch between predefined View Variants of a particular business object type.

In a Windows Forms application:

ViewChangeActionInWindow

In an ASP.NET Web Forms application:

ViewChangeActionInWeb

The ChangeVariantController controller is provided by the View Variants module and is activated for all Views. You can use the Model Editor to customize the ChangeVariantController controller behavior via the ActionDesign | Controllers | DevExpress.ExpressApp.ViewVariantsModule.ChangeVariantController node. The ChangeVariant Action is accessible via the ActionDesign | Actions | ChangeVariant node.

For details on the ChangeVariant Action, refer to the description of the ChangeVariantController.ChangeVariantAction property, that provides access to this action.

This Controller uses the CurrentFrameViewVariantsManager object to populate the items of the ChangeVariant Action, switch the variant according to an end-user’s selection and save the selected variant. By default, the last chosen variant identifier is stored with user customizations (in the Model.User.xafml file or in browser cookies). The VariantInfo structure is used to represent a single variant and the VariantsInfo class - to represent a set of variants available for a particular varied View.

#Implements

#Inheritance

See Also