Compartilhar via


WorkbookBase.DisplayDrawingObjects Property

Definition

Gets or sets how shapes are displayed.

public:
 property Microsoft::Office::Interop::Excel::XlDisplayDrawingObjects DisplayDrawingObjects { Microsoft::Office::Interop::Excel::XlDisplayDrawingObjects get(); void set(Microsoft::Office::Interop::Excel::XlDisplayDrawingObjects value); };
public Microsoft.Office.Interop.Excel.XlDisplayDrawingObjects DisplayDrawingObjects { get; set; }
member this.DisplayDrawingObjects : Microsoft.Office.Interop.Excel.XlDisplayDrawingObjects with get, set
Public Property DisplayDrawingObjects As XlDisplayDrawingObjects

Property Value

One of the following XlDisplayDrawingObjects values: xlDisplayShapes, xlPlaceholders, or xlHide.

Examples

The following code example adds a doughnut shape to worksheet Sheet1 of the current workbook, and then prompts the user to hide drawing objects by using the DisplayDrawingObjects property. If the user hides drawing objects, then the doughnut shape will be invisible; otherwise, the doughnut shape will be visible.

This example is for a document-level customization.

private void AddCustomView()
{
    this.CustomViews.Add("Summary", true, true);

    this.Application.Dialogs[Excel.XlBuiltInDialog.xlDialogCustomViews].Show();
}
Private Sub AddCustomView()
    Me.CustomViews.Add("Summary", True, True)
    Me.Application.Dialogs( _
        Excel.XlBuiltInDialog.xlDialogCustomViews).Show()
End Sub

Applies to