Text3DPresetEffect.cs
  1. //
  2. // This code is part of Document Solutions for Word demos.
  3. // Copyright (c) MESCIUS inc. All rights reserved.
  4. //
  5. using System;
  6. using System.IO;
  7. using System.Drawing;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using GrapeCity.Documents.Word;
  11.  
  12. namespace DsWordWeb.Demos
  13. {
  14. // This example shows how to add a preset 3D effect to a text.
  15. public class Text3DPresetEffect
  16. {
  17. public GcWordDocument CreateDocx()
  18. {
  19. var doc = new GcWordDocument();
  20.  
  21. Paragraph paragraph = doc.Body.Paragraphs.Add();
  22. Run run = paragraph.GetRange().Runs.Add("Text effects Preset 5");
  23. run.Font.Size = 72f;
  24.  
  25. // apply preset text effects
  26. run.Font.ApplyEffectsPreset(FontEffectsPreset.Preset5);
  27.  
  28. // Done:
  29. return doc;
  30. }
  31. }
  32. }
  33.