Shape3DPresetEffect.cs
C# VB
//// This code is part of Document Solutions for Word demos.// Copyright (c) MESCIUS inc. All rights reserved.//using GrapeCity.Documents.Word;
namespace DsWordWeb.Demos{ // This example shows how to add a preset 3D effect to a shape. public class Shape3DPresetEffect { public GcWordDocument CreateDocx() { var doc = new GcWordDocument();
Paragraph paragraph = doc.Body.Paragraphs.Add(); Run run = paragraph.GetRange().Runs.Add(); Shape shape = run.GetRange().Shapes.Add(200, 200, GeometryType.Rectangle); shape.Fill.Type = FillType.Solid; shape.Fill.SolidFill.ThemeColor = ThemeColorId.Accent1;
// apply preset shape effects shape.ApplyEffectsPreset(ShapeEffectsPreset.Preset10);
// Done: return doc; } }}