# SlideTransition

> Control slide transitions in Python with Aspose.Slides: choose types, speed, sound, and timing to polish presentations in PPT, PPTX and ODP.

Source: https://docs.aspose.com/slides/python-net/examples/elements/slide-transition/
Updated: 2026-08-05


Demonstrates applying slide transition effects and timings with **Aspose.Slides for Python via .NET**.

## **Add a Slide Transition**

Apply a fade transition effect to the first slide.

```py
import aspose.slides as slides

def add_slide_transition():
    with slides.Presentation() as presentation:
        slide = presentation.slides[0]

        # Apply a fade transition.
        slide.slide_show_transition.type = slides.slideshow.TransitionType.FADE

        presentation.save("slide_transition.pptx", slides.export.SaveFormat.PPTX)
```

## **Access a Slide Transition**

Read the transition type currently assigned to a slide.

```py
import aspose.slides as slides

def access_slide_transition():
    with slides.Presentation("slide_transition.pptx") as presentation:
        slide = presentation.slides[0]

        # Access the transition type.
        transition_type = slide.slide_show_transition.type
```

## **Remove a Slide Transition**

Clear any transition effect by setting the type to `NONE`.

```py
import aspose.slides as slides

def remove_slide_transition():
    with slides.Presentation("slide_transition.pptx") as presentation:
        slide = presentation.slides[0]

        # Remove transition by setting none.
        slide.slide_show_transition.type = slides.slideshow.TransitionType.NONE

        presentation.save("slide_transition_removed.pptx", slides.export.SaveFormat.PPTX)
```

## **Set Transition Duration**

Specify how long the slide is displayed before advancing automatically. `advance_after_time` is the display time of the slide, not the length of the transition animation, and setting it also turns on automatic advancing.

```py
import aspose.slides as slides

def set_transition_duration():
    with slides.Presentation("slide_transition.pptx") as presentation:
        slide = presentation.slides[0]

        slide.slide_show_transition.advance_on_click = True
        slide.slide_show_transition.advance_after_time = 2000  # in milliseconds.

        presentation.save("transition_duration.pptx", slides.export.SaveFormat.PPTX)
```

