WorkbookBase.DisplayDrawingObjects Property
Gets or sets how shapes are displayed.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
'Declaration
Public Property DisplayDrawingObjects As XlDisplayDrawingObjects
Get
Set
public XlDisplayDrawingObjects DisplayDrawingObjects { get; set; }
Property Value
Type: Microsoft.Office.Interop.Excel.XlDisplayDrawingObjects
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 Sub AddCustomView()
Me.CustomViews.Add("Summary", True, True)
Me.Application.Dialogs( _
Excel.XlBuiltInDialog.xlDialogCustomViews).Show()
End Sub
private void AddCustomView()
{
this.CustomViews.Add("Summary", true, true);
this.Application.Dialogs[Excel.XlBuiltInDialog.xlDialogCustomViews].Show(
missing, missing, missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.