Control Deactivation Plug-ins - Cloud - Author-it

Development Documentation

A control deactivation plug-in changes the availability of user interface controls in Author. You use the DeactivateUIControlArgs class to add a control deactivation plug-in to Author.

You can use control deactivation plug-ins to simplify the Author for users based on group membership or to remove controls that you replace with your own plug-in user interface.

The code below shows an example of using the DeactivateUIAddArgs and DeactivateUIControlArgs classes to implement a plug-in that disables the Create Book button on the main form in Author.

using AuthoritExtensibility;

namespace Sample_ControlDeactivationPlugin


public class PluginManager : IPlugin


private AitApplicationProxy proxy;

public PluginManager(AitApplicationProxy hostProxy)


proxy = hostProxy; //Set the local proxy to the proxy passed by the host

DeactivateUIAddArgs disableArgs = new DeactivateUIAddArgs(); //Initiatilize the plug-in arguments

disableArgs.OnClick = disableArgs_OnClick; //Set the launch point for the plug-in

disableArgs.PluginName = "Deactivation Plug-in"; //Set the name for the plug-in

proxy.AddPluginToDeactivateUI(disableArgs); //Add the plug-in to the host


public void disableArgs_OnClick(object sender, AuthoritEventArgs args)


DeactivateUIControlArgs controlArgs = new DeactivateUIControlArgs(); //Initialize the control deactivation arguments

controlArgs.ControlName = "CreateBook"; //Set the name of the control to deactivate

controlArgs.ControlType = UIControlType.RibbonButton; //Set the type of the control

controlArgs.DeactivationType = DeactivationType.Disabled; //Set the deactivation type

controlArgs.ParentForm = TargetForm.MainForm; //Set the form for the control

proxy.UIControlDeactivate(controlArgs); //Add the deactivation arguments to the host