officefileapi-devexpress-dot-docs-dot-presentation-dot-notesslide-6050e9d2.md
Obtains the note text box. Allows you to specify note text and format settings.
Namespace : DevExpress.Docs.Presentation
Assembly : DevExpress.Docs.Presentation.v25.2.dll
NuGet Package : DevExpress.Docs.Presentation
public TextArea TextArea { get; }
Public ReadOnly Property TextArea As TextArea
| Type | Description |
|---|---|
| TextArea |
An object that contains text settings.
|
The following code snippet obtains and changes note settings:
using DevExpress.Docs;
using DevExpress.Docs.Presentation;
using System.Drawing;
//...
using (var presentation = new Presentation(File.ReadAllBytes(@"C:\Documents\Presentation.pptx"))) {
Slide slide = presentation.Slides[0];
var note = slide.Notes;
note.TextArea.Text = "updated text";
// Create paragraph properties
ParagraphProperties textParagraphProperties = new ParagraphProperties() {
TextProperties = new TextProperties() { HighlightColor = new OfficeColor(Color.Red) }
};
// Apply text properties to the note
note.TextArea.ParagraphProperties = textParagraphProperties;
note.TextArea.Level1ParagraphProperties = textParagraphProperties;
presentation.SaveDocument(new FileStream("C://Documents//presentation_updated.pptx", FileMode.OpenOrCreate, FileAccess.ReadWrite));
}
Imports DevExpress.Docs
Imports DevExpress.Docs.Presentation
Imports System.Drawing
Using presentation = New Presentation(File.ReadAllBytes("C:\Documents\Presentation.pptx"))
Dim slide As Slide = presentation.Slides(0)
Dim note = slide.Notes
note.TextArea.Text = "updated text"
' Create paragraph properties
Dim textParagraphProperties As ParagraphProperties = New ParagraphProperties() With {
.TextProperties = New TextProperties() With {
.HighlightColor = New OfficeColor(Color.Red)
}
}
' Apply text properties to the note
note.TextArea.ParagraphProperties = textParagraphProperties
note.TextArea.Level1ParagraphProperties = textParagraphProperties
' Save the updated presentation
Using fs As New FileStream("C:\Documents\presentation_updated.pptx", FileMode.OpenOrCreate, FileAccess.ReadWrite)
presentation.SaveDocument(fs)
End Using
End Using
See Also