usmanazizgroupdocs
4/17/2017 - 10:06 AM

AddWatermarkWithSlidesShapeSettings.cs

// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
using (SlidesDocument doc = Document.Load<SlidesDocument>(Utilities.MapSourceFilePath (FilePath)))
{
    TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 19));
    watermark.IsBackground = true;
    SlidesShapeSettings shapeSettings = new SlidesShapeSettings();

    // Set the shape name
    shapeSettings.Name = "Shape 1";

    // Set the descriptive (alternative) text that will be associated with the shape
    shapeSettings.AlternativeText = "Test watermark";

    // Editing of the shape in PowerPoint is forbidden
    shapeSettings.IsLocked = true;

    doc.AddWatermark(watermark, shapeSettings);

    doc.Save();
}