officefileapi-devexpress-dot-docs-dot-presentation-dot-presentation-c4f57125.md
Gets or sets the default text style for the presentation.
Namespace : DevExpress.Docs.Presentation
Assembly : DevExpress.Docs.Presentation.v25.2.dll
NuGet Package : DevExpress.Docs.Presentation
public TextStyle DefaultTextStyle { get; set; }
Public Property DefaultTextStyle As TextStyle
| Type | Description |
|---|---|
| TextStyle |
Contains text style settings.
|
The Presentation.DefaultTextStyle is applied to all text elements in the presentation unless you specify a different style for certain text elements.
The following code snippet specifies the default text style properties for Level 1 texts:
using DevExpress.Docs.Presentation;
namespace PresentationApiSample;
public class Program {
public static void Main(string[] _) {
// Load a presentation from a file
Presentation presentation = new Presentation(File.ReadAllBytes(@"..\..\..\data\my-presentation.pptx"));
// Set the paragraph text style properties for texts of Level 1
presentation.DefaultTextStyle.Level1ParagraphProperties.TextProperties.Bold = true;
presentation.DefaultTextStyle.Level1ParagraphProperties.TextProperties.Italic = true;
}
}
Imports DevExpress.Docs.Presentation
Namespace PresentationApiSample
Public Class Program
Public Shared Sub Main(__ As String())
' Load a presentation from a file
Dim presentation As Presentation = New Presentation(File.ReadAllBytes("..\..\..\data\my-presentation.pptx"))
' Set the paragraph text style properties for texts of Level 1
presentation.DefaultTextStyle.Level1ParagraphProperties.TextProperties.Bold = True
presentation.DefaultTextStyle.Level1ParagraphProperties.TextProperties.Italic = True
End Sub
End Class
End Namespace
See Also