Back to Devexpress

Configure View Settings

officefileapi-405413-presentation-api-view-settings.md

latest8.4 KB
Original Source

Configure View Settings

  • Nov 07, 2025
  • 4 minutes to read

This article describes how to configure various view settings in the DevExpress Presentation API. It also includes links to the relevant API members that you can use to customize the presentation’s appearance and behavior.

Set the Active View

Use the Presentation.ViewProperties.ActiveViewType property to specify the default view used when an application displays the presentation. You can choose from the following views:

Example

The following code snippet defines the view an application displays when a user opens the presentation:

csharp
using (Presentation presentation = new Presentation("document.pptx")) {
    presentation.ViewProperties.ActiveViewType = ViewType.HandoutView;
}
vb
Using presentation As New Presentation("document.pptx")
    presentation.ViewProperties.ActiveViewType = ViewType.HandoutView
End Using

Adjust Grid Spacing

DevExpress Presentation API includes the GridSpacing property that allows you to adjust grid spacing settings for a view.

This property applies to all views mentioned above, except for SlideSorterView.

Example

The following code sample sets the Presentation.ViewProperties.GridSpacing property value to 50:

csharp
using (Presentation presentation = new Presentation("document.pptx")) {
    presentation.ViewProperties.GridSpacing = 500;
}
vb
Using presentation As New Presentation("document.pptx")
    presentation.ViewProperties.GridSpacing = 500
End Using

Customize the Normal View

The normal view consists of three content regions: the slide view, the thumbnails pane, and the notes pane.

DevExpress Presentation API includes the NormalViewProperties class that allows you to customize the following settings of the normal view:

Presentation.NormalViewProperties.RestoredLeftGets or sets the size of the thumbnails pane in the normal view (when the pane is not minimized or maximized).Presentation.NormalViewProperties.RestoredTopGets or sets the height of the slide area in the normal view (when the slide area is not minimized or maximized).Presentation.NormalViewProperties.ShowOutlineIconsGets ot sets whether the application should show icons if it displays outline content in any content region in normal view mode. Applications may ignore this setting.Presentation.NormalViewProperties.HorizontalBarStateGets or sets the state of the horizontal splitter bar (separates the slide area from the notes pane).Presentation.NormalViewProperties.VerticalBarStateGets or sets the state of the vertical splitter bar (separates the slide area from the thumbnails pane).Presentation.NormalViewProperties.SnapVerticalSplitterGets or sets whether the vertical splitter should be minimized if the side region has an insufficient size. Applications may ignore this setting.Presentation.NormalViewProperties.UseSingleViewGets or sets whether to display slide area only (hide thumbnails and notes).

Tip

Refer to property descriptions above for code samples.

Examples

Collapse the Thumbnails Pane

The following code snippet collapses the thumbnails pane (sets Size to 0.0) and disables automatic size adjustment:

csharp
using (Presentation presentation = new Presentation("document.pptx")) {
    NormalViewRestoredProperties viewProps = new NormalViewRestoredProperties(0.0, false);
    presentation.ViewProperties.NormalViewProperties.RestoredLeft = viewProps;
}
vb
Using presentation As New Presentation("document.pptx")
    Dim viewProps As New NormalViewRestoredProperties(0.0, False)
    presentation.ViewProperties.NormalViewProperties.RestoredLeft = viewProps
End Using

Display a Single Slide View

The following code snippet displays a single slide view:

csharp
using (Presentation presentation = new Presentation("document.pptx")) {
    presentation.ViewProperties.NormalViewProperties.UseSingleView = true;
}
vb
Using presentation As New Presentation("document.pptx")
    presentation.ViewProperties.NormalViewProperties.UseSingleView = True
End Using

Customize Slide and Notes Regions

DevExpress Presentation API includes the CommonSlideViewProperties class. Use its members to customize Slide or Notes regions. Any changes you make apply to all views that contain these regions. The following settings are available:

Presentation.CommonSlideViewProperties.DrawingGuidesGets the drawing guide collection.Presentation.CommonSlideViewProperties.ScaleGets or sets the view scaling ratio as a percentage. Applications may ignore this setting.Presentation.CommonSlideViewProperties.VariableScaleGets or sets whether the view content should automatically scale to fit the current window. Applications may ignore this setting.

Example

The following code snippet creates a vertical drawing guide and adds it to the DrawingGuides collection:

csharp
using (Presentation presentation = new Presentation("document.pptx")) {
    DrawingGuide guide1 = new DrawingGuide(Direction.Vertical, 150);
    presentation.ViewProperties.SlideViewProperties.DrawingGuides.Add(guide1);
}
vb
Using presentation As New Presentation("document.pptx")
    Dim guide1 As New DrawingGuide(Direction.Vertical, 150)
    presentation.ViewProperties.SlideViewProperties.DrawingGuides.Add(guide1)
End Using