Back to Devexpress

SlideBase.ActualNotesPlaceholder Property

officefileapi-devexpress-dot-docs-dot-presentation-dot-slidebase-2227cffb.md

latest3.6 KB
Original Source

SlideBase.ActualNotesPlaceholder Property

Obtains the note placeholder shape.

Namespace : DevExpress.Docs.Presentation

Assembly : DevExpress.Docs.Presentation.v25.2.dll

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public Shape ActualNotesPlaceholder { get; }
vb
Public ReadOnly Property ActualNotesPlaceholder As Shape

Property Value

TypeDescription
Shape

The note placeholder shape.

|

Example

How to: Change Note Master Layout Settings

The following code snippet changes note master layout settings:

csharp
using DevExpress.Docs;
using DevExpress.Docs.Presentation;
using System.Drawing;
//...

using (var presentation = new Presentation(File.ReadAllBytes (@"C:\Documents\Presentation.pptx")))
{
    var notesMaster = presentation.NotesMaster;

    // Specify header, footer, and date and time:
    notesMaster.ActualHeaderPlaceholder.TextArea.Text = "DevExpress Test Presentation";
    notesMaster.ActualFooterPlaceholder.TextArea.Text = "Created by DevExpress Presentation API";
    notesMaster.ActualDateTimePlaceholder.TextArea.Text = DateTime.Now.ToString();

    // Change notes master background:
    SolidFill fill = new SolidFill(Color.LightCyan);
    notesMaster.Background = new CustomSlideBackground(fill);

    // Change default text formatting settings:
    ParagraphProperties pp = new ParagraphProperties();
    pp.TextProperties = new TextProperties() { HighlightColor = new OfficeColor(Color.Red) };
    notesMaster.TextStyle.ParagraphProperties = pp;
    notesMaster.TextStyle.Level1ParagraphProperties = pp;

    presentation.SaveDocument(new FileStream("C://Documents//presentation-updated.pptx", FileMode.OpenOrCreate, FileAccess.ReadWrite));
}
vb
Imports DevExpress.Docs
Imports DevExpress.Docs.Presentation
Imports System.Drawing
'...

Using presentation = New Presentation("C:\Documents\Presentation.pptx")
    Dim notesMaster = presentation.NotesMaster

    ' Specify header, footer, and date and time:
    notesMaster.ActualHeaderPlaceholder.TextArea.Text = "DevExpress Test Presentation"
    notesMaster.ActualFooterPlaceholder.TextArea.Text = "Created by DevExpress Presentation API"
    notesMaster.ActualDateTimePlaceholder.TextArea.Text = Date.Now.ToString()

    ' Change notes master background:
    Dim fill As New SolidFill(Color.LightCyan)
    notesMaster.Background = New CustomSlideBackground(fill)

    ' Change default text formatting settings:
    Dim pp As ParagraphProperties = New ParagraphProperties()
    pp.TextProperties = New TextProperties() With {
            .HighlightColor = New OfficeColor(Color.Red)
        }
    notesMaster.TextStyle.ParagraphProperties = pp
    notesMaster.TextStyle.Level1ParagraphProperties = pp

    presentation.SaveDocument(New FileStream("C://Documents//presentation-updated.pptx", FileMode.OpenOrCreate, FileAccess.ReadWrite))
End Using

See Also

SlideBase Class

SlideBase Members

DevExpress.Docs.Presentation Namespace