A newer version of this page is available. Switch to the current version.

IPrintingSystem.SetCommandVisibility(PrintingSystemCommand, Boolean) Method

If implemented by a class, changes the visibility of the specified printing system command.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Data.v18.2.dll


void SetCommandVisibility(
    PrintingSystemCommand command,
    bool visible
Sub SetCommandVisibility(
    command As PrintingSystemCommand,
    visible As Boolean


Name Type Description
command PrintingSystemCommand

A PrintingSystemCommand object specifying the command whose visibility needs to be changed.

visible Boolean

One of the CommandVisibility enumeration values specifying a new visibility state for the command.



The SetCommandVisibility method takes effect only in Windows Forms applications, where it must be called after the DocumentViewer.DocumentSource property has been assigned a value.

Every printing system command represents either a toolbar button, or a menu item, or both a button and a corresponding menu item in the Preview window. The values of the CommandVisibility enumeration represent the visibility states of the command. So, the SetCommandVisibility method allows the visibility of a single toolbar button or menu item to be altered.

See Also