Presentation View Properties

About INormalViewProperties

Represents normal view properties.

Property ShowOutlineIcons specifies whether the application should show icons if displaying outline content in any of the content regions of normal view mode.

Property SnapVerticalSplitter specifies whether the vertical splitter should snap to a minimized state when the side region is sufficiently small.

Property PreferSingleView specifies whether the user prefers to see a full-window single-content region over the standard normal view with three content regions. If enabled, the application may choose to display one of the content regions in the entire window.

Properties VerticalBarState and HorizontalBarState specify the state that the horizontal or vertical splitter bar should be shown in. A horizontal splitter bar separates the slide from the content region below the slide, vertical splitter bar separates the slide from the side content region. Possible values are: SplitterBarStateType.Minimized, SplitterBarStateType.Maximized and SplitterBarStateType.Restored.

Properties RestoredLeft and RestoredTop specify the sizing of the top or side slide region of the normal view, when SplitterBarStateType.Restored value applied for VerticalBarState and HorizontalBarState accordingly.

About INormalViewRestoredProperties

Specifies the sizing of the slide region ((width when a child of RestoredTop, height when a child of RestoredLeft) of the normal view, when the region is of a variable restored size(neither minimized nor maximized). 

Property DimensionSize specifies the size of the slide region (width when a child of restoredTop, height when a child of restoredLeft).

Property AutoAdjust specifies whether the size of the side content region should compensate for the new size when resizing the window containing the view within the application

An example is given below shows how can you access ViewProperties.NormalViewProperties properties for a presentation.

//Instantiate a presentation object that represents a presentation file
auto pres = System::MakeObject<Presentation>(u"demo.pptx");
pres->get_ViewProperties()->get_NormalViewProperties()->set_HorizontalBarState(SplitterBarStateType::Restored);
pres->get_ViewProperties()->get_NormalViewProperties()->set_VerticalBarState(SplitterBarStateType::Maximized);

pres->get_ViewProperties()->get_NormalViewProperties()->get_RestoredTop()->set_AutoAdjust(true);
pres->get_ViewProperties()->get_NormalViewProperties()->get_RestoredTop()->set_DimensionSize(80.0f);
pres->get_ViewProperties()->get_NormalViewProperties()->set_ShowOutlineIcons(true);

pres->Save(u"presentation_normal_view_state.pptx", SaveFormat::Pptx);

Set Default Zoom Value

Aspose.Slides for C++ now supports setting the default zoom value for presentation such that when the presentation is opened, zoom is set already. This could be done by setting the ViewProperties of a presentation. Slide View Properties as well as get_NotesViewProperties() could be set programmatically. In this topic, we will see with an example how to set the View Properties of Presentation in Aspose.Slides.

In order to set the view properties. Please follow the steps below:

  1. Create an instance of Presentation class
  2. Set View Properties of Presentation
  3. Write the presentation as a PPTX file

In the example given below, we have set the zoom value for slide view as well as notes view.

// Instantiate a Presentation object that represents a presentation file
auto presentation = System::MakeObject<Presentation>(u"demo.pptx");
// Setting View Properties of Presentation

presentation->get_ViewProperties()->get_SlideViewProperties()->set_Scale(100);
// Zoom value in percentages for slide view
presentation->get_ViewProperties()->get_NotesViewProperties()->set_Scale(100);
// Zoom value in percentages for notes view 

presentation->Save(u"Zoom_out.pptx", SaveFormat::Pptx);

Set View Properties

In order to set the view properties. Please follow the steps below:

  1. Create an instance of Presentation class.
  2. Set View Properties of Presentation.
  3. Write the presentation as a PPTX file.

In the example given below, we have set the zoom value for slide view as well as notes view.

// Instantiate a Presentation object that represents a presentation file
auto presentation = System::MakeObject<Presentation>(u"demo.pptx");

// Setting View Properties of Presentation
// Zoom value in percentages for slide view
presentation->get_ViewProperties()->get_SlideViewProperties()->set_Scale(100);
// Zoom value in percentages for notes view
presentation->get_ViewProperties()->get_NotesViewProperties()->set_Scale(100);

presentation->Save(u"Zoom_out.pptx", SaveFormat::Pptx);