# Aspose.Slides for .NET > Complete English documentation. Each page retains its canonical source URL. # Aspose.Slides for .NET > Start here: install Aspose.Slides for .NET, create a first presentation, and find the guides for common tasks, deployment and the API reference. Source: https://docs.aspose.com/slides/net/ Updated: 2026-10-27 Aspose.Slides for .NET Aspose.Slides for .NET is a class library for creating, reading, editing and converting PowerPoint and OpenDocument presentations in .NET applications, without Microsoft PowerPoint or Office Automation. It loads and saves PPT, PPTX, PPS, POT and ODP, including macro-enabled and template variants, and exports to PDF, XPS, HTML, SVG, TIFF, Markdown and images.

Explore features and support — browse the library features and open their guides.

------

Get Started


GETTING STARTED

EVALUATE

Build with Slides


COMMON TASKS

SLIDES WORKFLOWS

EXAMPLES

Deploy & Support


DEPLOY

REFERENCE

SUPPORT

------ ## **Your first presentation** Create a console application with the .NET SDK 6 or later: ```bash dotnet new console -n HelloSlides cd HelloSlides ``` Then add one package for your platform: - On Windows: `dotnet add package Aspose.Slides.NET` - On Linux and macOS: `dotnet add package Aspose.Slides.NET6.CrossPlatform` — see [Installation](https://docs.aspose.com/slides/net/installation/) for the Linux prerequisite and for the systems that need Aspose.Slides.NET instead. Replace the contents of *Program.cs* with this code and run `dotnet run`: ```csharp using Aspose.Slides; using Aspose.Slides.Export; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 400, 100); shape.TextFrame.Text = "Hello, Aspose.Slides!"; presentation.Save("hello.pptx", SaveFormat.Pptx); ``` The program saves *hello.pptx* with one slide holding a text box. Without a license, the saved file carries an evaluation watermark — see [Licensing](https://docs.aspose.com/slides/net/licensing/). For more ways to create and fill a presentation, see [Create Presentations](https://docs.aspose.com/slides/net/create-presentation/). ## Related articles - [API Reference](https://docs.aspose.com/slides/net/api-reference/) - [Product Overview](https://docs.aspose.com/slides/net/product-overview/) # Customize 3D Charts in Presentations in .NET > Create 3D charts in PowerPoint presentations with Aspose.Slides for .NET. Adjust rotation, height proportions, chart depth, and spacing between series with C# examples. Source: https://docs.aspose.com/slides/net/3d-chart/ Updated: 2026-11-09 ## **Overview** Aspose.Slides for .NET lets you customize the view of a 3D chart through the [IChart.Rotation3D](https://reference.aspose.com/slides/net/aspose.slides.charts/ichart/rotation3d/) property. This article demonstrates how to adjust rotation, height proportions, depth, right-angle axes, and spacing between series, then save the presentation in PPTX format. ## **Set the Rotation and Depth of a 3D Chart** The example below creates a [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation/) and uses [IShapeCollection.AddChart](https://reference.aspose.com/slides/net/aspose.slides/ishapecollection/addchart/) to add a stacked 3D column chart to its first slide. It replaces the default series and categories with two series containing three values each. Worksheet index `0` identifies the chart's first data worksheet; row `0` holds series names, and column `0` holds category labels. The [RotationX](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/rotationx/) and [RotationY](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/rotationy/) properties set the chart's rotation to 40 and 270 degrees, respectively. [DepthPercents](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/depthpercents/) sets its depth to 150% of its width, while [RightAngleAxes](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/rightangleaxes/) enables right-angle axes instead of perspective. The resulting presentation contains the populated chart with these 3D view settings. ```csharp using Aspose.Slides; using Aspose.Slides.Charts; using Aspose.Slides.Export; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var chart = slide.Shapes.AddChart(ChartType.StackedColumn3D, 0, 0, 500, 500); chart.ChartData.Series.Clear(); chart.ChartData.Categories.Clear(); var workbook = chart.ChartData.ChartDataWorkbook; var worksheetIndex = 0; var values = new double[,] { { 20, 50, 30 }, { 30, 10, 60 } }; for (var categoryIndex = 0; categoryIndex < 3; categoryIndex++) { var categoryCell = workbook.GetCell(worksheetIndex, categoryIndex + 1, 0, $"Category {categoryIndex + 1}"); chart.ChartData.Categories.Add(categoryCell); } for (var seriesIndex = 0; seriesIndex < 2; seriesIndex++) { var seriesCell = workbook.GetCell(worksheetIndex, 0, seriesIndex + 1, $"Series {seriesIndex + 1}"); var series = chart.ChartData.Series.Add(seriesCell, chart.Type); for (var categoryIndex = 0; categoryIndex < 3; categoryIndex++) { var valueCell = workbook.GetCell(worksheetIndex, categoryIndex + 1, seriesIndex + 1, values[seriesIndex, categoryIndex]); series.DataPoints.AddDataPointForBarSeries(valueCell); } } chart.Rotation3D.RightAngleAxes = true; chart.Rotation3D.RotationX = 40; chart.Rotation3D.RotationY = 270; chart.Rotation3D.DepthPercents = 150; presentation.Save("Rotation3D_out.pptx", SaveFormat.Pptx); ``` ## **Adjust the Height Proportions of a 3D Chart** Use [IRotation3D.HeightPercents](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/heightpercents/) to set the height of a 3D chart as a percentage of its width. This changes the proportions of the 3D scene without resizing the chart object on the slide. The following example creates a [Column3D](https://reference.aspose.com/slides/net/aspose.slides.charts/charttype/) chart with the default data: three series and four categories. It saves three presentations with height proportions of 50%, 100%, and 200%. The chart's position, width, and height remain fixed. The data, rotation, depth, series spacing, and formatting are identical in all three files; only the height percentage changes. ```csharp using Aspose.Slides; using Aspose.Slides.Charts; using Aspose.Slides.Export; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var chart = slide.Shapes.AddChart(ChartType.Column3D, 40, 30, 620, 460); chart.Rotation3D.RotationX = 20; chart.Rotation3D.RotationY = 30; chart.Rotation3D.RightAngleAxes = true; chart.Rotation3D.DepthPercents = 100; chart.ChartData.Series[0].ParentSeriesGroup.GapDepth = 150; foreach (ushort heightPercent in new ushort[] { 50, 100, 200 }) { chart.Rotation3D.HeightPercents = heightPercent; presentation.Save($"chart_height_{heightPercent}.pptx", SaveFormat.Pptx); } ``` The following images were exported from the generated presentations using Microsoft PowerPoint. A smaller percentage produces a flatter scene, while a larger percentage produces a taller scene within the same chart object. PowerPoint may also adjust axis tick intervals and label placement to fit the scene. | Height: 50% | Height: 100% | Height: 200% | | --- | --- | --- | | ![3D column chart with height set to 50 percent of its width](https://docs.aspose.com/slides/net/3d-chart/height_percent_50.png) | ![3D column chart with height set to 100 percent of its width](https://docs.aspose.com/slides/net/3d-chart/height_percent_100.png) | ![3D column chart with height set to 200 percent of its width](https://docs.aspose.com/slides/net/3d-chart/height_percent_200.png) | These properties control different aspects of the chart: | Property | Effect | | --- | --- | | [IRotation3D.HeightPercents](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/heightpercents/) | Height of the 3D scene as a percentage of its width. | | [IChart.Height](https://reference.aspose.com/slides/net/aspose.slides/ishape/height/) | Height of the chart object on the slide, in points. | | [IRotation3D.DepthPercents](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/depthpercents/) | Depth of the 3D scene as a percentage of its width. | | [IChartSeriesGroup.GapDepth](https://reference.aspose.com/slides/net/aspose.slides.charts/ichartseriesgroup/gapdepth/) | Spacing between series along the depth axis, as a percentage of the marker width. | The height setting affects 3D column and bar charts, including cylinder, cone, and pyramid variants, as well as 3D line, area, pie, and surface charts. The comparison above uses the verified `Column3D` type. The setting does not change the appearance of a 2D `ClusteredColumn` chart or a `BubbleWith3D` chart; these names are members of the [ChartType](https://reference.aspose.com/slides/net/aspose.slides.charts/charttype/) enumeration. For other chart appearance settings, see [Chart Formatting](https://docs.aspose.com/slides/net/chart-formatting/). ## **Adjust the Gap Between Series** Use [IChartSeriesGroup.GapDepth](https://reference.aspose.com/slides/net/aspose.slides.charts/ichartseriesgroup/gapdepth/) to control the distance between data series along the depth axis of a 3D chart, expressed as a percentage of the marker width. Use values from **0 to 500**, inclusive: `0` removes the gap, while larger values increase the spacing. With a fixed chart depth, increasing the gap makes the markers thinner along the depth axis. Access the group through [IChartSeries.ParentSeriesGroup](https://reference.aspose.com/slides/net/aspose.slides.charts/ichartseries/parentseriesgroup/). The setting applies to every series in that group, not just the series used to access it. [IChartSeries.GapDepth](https://reference.aspose.com/slides/net/aspose.slides.charts/ichartseries/gapdepth/) is read-only and reflects the parent group's setting. This setting affects 3D column and bar charts, including their cylinder, cone, and pyramid variants, as well as 3D line and area charts. The appearance depends on whether the series are arranged in depth, clustered, or stacked. For a clear comparison of gaps between separate series, use `ChartType.Column3D` from the [ChartType](https://reference.aspose.com/slides/net/aspose.slides.charts/charttype/) enumeration. These properties control different aspects of the chart: | Property | Effect | | --- | --- | | [IChartSeriesGroup.GapDepth](https://reference.aspose.com/slides/net/aspose.slides.charts/ichartseriesgroup/gapdepth/) | Spacing between series along the depth axis, as a percentage of the marker width. | | [IChartSeriesGroup.GapWidth](https://reference.aspose.com/slides/net/aspose.slides.charts/ichartseriesgroup/gapwidth/) | Spacing between adjacent bar or column clusters, as a percentage of the bar or column width. | | [IRotation3D.DepthPercents](https://reference.aspose.com/slides/net/aspose.slides.charts/irotation3d/depthpercents/) | Overall chart depth, as a percentage of the chart width. | The following self-contained example uses the default chart data, which contains three series and four categories. It saves two presentations with identical data, rotation, gap width, and chart depth; only the gap depth changes. ```csharp using Aspose.Slides; using Aspose.Slides.Charts; using Aspose.Slides.Export; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var chart = slide.Shapes.AddChart(ChartType.Column3D, 40, 30, 620, 230); chart.Rotation3D.RotationX = 20; chart.Rotation3D.RotationY = 30; chart.Rotation3D.DepthPercents = 100; var series = chart.ChartData.Series[0]; var group = series.ParentSeriesGroup; group.GapWidth = 150; foreach (ushort gapDepth in new ushort[] { 0, 500 }) { group.GapDepth = gapDepth; var fileName = $"series_gap_depth_{gapDepth}.pptx"; presentation.Save(fileName, SaveFormat.Pptx); } ``` The following images were exported from the generated presentations using Microsoft PowerPoint. | Gap depth: 0% | Gap depth: 500% | | --- | --- | | ![3D column chart with no gap between series along the depth axis](https://docs.aspose.com/slides/net/3d-chart/gap_depth_0.png) | ![3D column chart with a 500 percent gap between series along the depth axis](https://docs.aspose.com/slides/net/3d-chart/gap_depth_500.png) | ## **FAQ** **Which chart types support 3D mode in Aspose.Slides?** Aspose.Slides supports 3D variants of column charts, including Column 3D, Clustered Column 3D, Stacked Column 3D, and 100% Stacked Column 3D, along with related 3D types exposed through the [ChartType](https://reference.aspose.com/slides/net/aspose.slides.charts/charttype/) enumeration. For an exact, up-to-date list, check the [ChartType](https://reference.aspose.com/slides/net/aspose.slides.charts/charttype/) members in the API reference of your installed version. **Can I get a raster image of a 3D chart for a report or the web?** Yes. You can export a chart to an image with [Shape.GetImage](https://reference.aspose.com/slides/net/aspose.slides/shape/getimage/) or [render the entire slide](https://docs.aspose.com/slides/net/convert-powerpoint-to-png/) to formats like PNG or JPEG. This is useful when you need a raster preview or want to embed the chart into documents, dashboards, or web pages without requiring PowerPoint. **How performant is building and rendering large 3D charts?** Performance depends on data volume and visual complexity. For best results, keep 3D effects minimal, avoid heavy textures on walls and plot areas, limit the number of data points per series when possible, and render to an appropriately sized output (resolution and dimensions) to match the target display or print needs. ## Related features - [Create 3D charts](https://docs.aspose.com/slides/features/charts-3d/) # Create 3D Effects in Presentations Using .NET > Apply and render 3D effects for PowerPoint shapes and text in .NET with Aspose.Slides. Configure camera, lighting, material, extrusion, fills, and 3D text. Source: https://docs.aspose.com/slides/net/3d-presentation/ Updated: 2026-09-25 ## **Overview** Aspose.Slides for .NET can create, edit, preserve, and render PowerPoint-style 3D formatting for shapes and text. This article covers 3D effects such as rotation, extrusion, bevels, lighting, material, gradient or picture fills, and 3D text. This article is about 3D formatting effects on PowerPoint shapes and text. It is not about inserting or editing standalone 3D model files. When you export a slide to an image, PDF, or HTML, Aspose.Slides renders those 3D effects into the exported 2D output. ## **3D Formatting Concepts** Use the [IShape.ThreeDFormat](https://reference.aspose.com/slides/net/aspose.slides/ishape/properties/threedformat) property to apply 3D formatting to a shape. The property exposes [IThreeDFormat](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat), which controls the 3D scene for that shape. For text, use the [ITextFrameFormat.ThreeDFormat](https://reference.aspose.com/slides/net/aspose.slides/itextframeformat/properties/threedformat) property. This applies 3D formatting to the text frame instead of the shape body. The most important properties are: | Property | What it controls | When to use it | |---|---|---| | [Camera](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/camera) | Viewpoint, preset camera type, rotation, zoom, and perspective. | Rotate the object in 3D space or match a PowerPoint 3D rotation preset. | | [LightRig](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/lightrig) | Light preset, direction, and light rotation. | Change how highlights and shadows appear on the 3D surface. | | [Material](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/material) | Surface material, such as flat, matte, plastic, or metal. | Make the same geometry look flatter, softer, glossy, or metallic. | | [ExtrusionHeight](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/extrusionheight) | How far the shape extends backward from its front face. | Turn a flat shape into a visibly thick 3D object. | | [ExtrusionColor](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/extrusioncolor) | Color of the extruded sides. | Make depth visible or coordinate the side color with the front fill. | | [Depth](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/depth) | Additional 3D depth used by PowerPoint 3D formatting. | Fine-tune depth for shapes or text, especially together with bevel and material settings. | | [BevelTop](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/beveltop) and [BevelBottom](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/bevelbottom) | Raised or rounded edges on the front and back faces. | Add a softened or molded edge instead of a sharp flat face. | | [ContourColor](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/contourcolor) and [ContourWidth](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/contourwidth) | Outline around the 3D object. | Emphasize the object boundary in rendered output. | ## **Create a 3D Shape** A shape usually needs four kinds of settings before it looks convincingly 3D: - Camera settings, because the default front view may hide the extrusion. - Light settings, because lighting makes the faces and sides readable. - Material settings, because the surface affects how light is rendered. - Extrusion or depth settings, because a flat shape needs thickness. The following example creates a rectangle, adds text to its front face, and applies 3D formatting. The camera rotation values are in degrees, and the extrusion height is 100 points. The example renders the slide to a PNG image at twice its default dimensions and saves the presentation as PPTX. ```csharp using System.Drawing; using Aspose.Slides; using Aspose.Slides.Export; const float imageScale = 2; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 150, 200, 200); shape.TextFrame.Text = "3D"; shape.TextFrame.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontHeight = 64; shape.FillFormat.FillType = FillType.Solid; shape.FillFormat.SolidFillColor.Color = Color.CornflowerBlue; shape.ThreeDFormat.Camera.CameraType = CameraPresetType.OrthographicFront; shape.ThreeDFormat.Camera.SetRotation(20, 30, 40); shape.ThreeDFormat.LightRig.LightType = LightRigPresetType.Flat; shape.ThreeDFormat.LightRig.Direction = LightingDirection.Top; shape.ThreeDFormat.Material = MaterialPresetType.Flat; shape.ThreeDFormat.ExtrusionHeight = 100; shape.ThreeDFormat.ExtrusionColor.Color = Color.Blue; using var thumbnail = slide.GetImage(imageScale, imageScale); thumbnail.Save("shape_3d.png"); presentation.Save("shape_3d.pptx", SaveFormat.Pptx); ``` The rendered slide image shows the rectangle as a thick 3D block: ![Rendered blue 3D rectangle with white 3D text on the front face](https://docs.aspose.com/slides/net/3d-presentation/img_01_01.png) ## **Rotate a Shape with the Camera** In PowerPoint, 3D rotation is configured from the 3-D Rotation pane. The X, Y, and Z rotation values correspond to the rotation you set through the camera API. ![PowerPoint 3-D Rotation pane with X, Y, and Z rotation values highlighted](https://docs.aspose.com/slides/net/3d-presentation/img_02_01.png) In Aspose.Slides, access the camera through [IThreeDFormat.Camera](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/camera). This example creates a rectangle, selects an orthographic front view, and sets its X, Y, and Z rotations to 20, 30, and 40 degrees, respectively. It configures the shape in memory without saving a file: ```csharp using Aspose.Slides; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 150, 200, 200); shape.ThreeDFormat.Camera.CameraType = CameraPresetType.OrthographicFront; shape.ThreeDFormat.Camera.SetRotation(20, 30, 40); ``` Use the camera when you need to change how the viewer sees the object. It does not change the 2D shape geometry on the slide. It changes the 3D viewpoint used by PowerPoint and by Aspose.Slides when rendering. ## **Add Extrusion and Depth** Extrusion makes a shape look thick by extending it behind the front face. In PowerPoint, the depth control sets this visible thickness, and the color control sets the color of the side faces. ![PowerPoint depth controls mapped to extrusion color and extrusion height properties](https://docs.aspose.com/slides/net/3d-presentation/img_02_02.png) Set [IThreeDFormat.ExtrusionHeight](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/extrusionheight) for the thickness and [IThreeDFormat.ExtrusionColor](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/extrusioncolor) for the side color. This example gives a rectangle a 100-point extrusion with purple sides and rotates the camera to reveal its thickness. It configures the shape in memory without saving a file: ```csharp using System.Drawing; using Aspose.Slides; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 150, 200, 200); shape.ThreeDFormat.Camera.CameraType = CameraPresetType.OrthographicFront; shape.ThreeDFormat.Camera.SetRotation(20, 30, 40); shape.ThreeDFormat.LightRig.LightType = LightRigPresetType.Flat; shape.ThreeDFormat.LightRig.Direction = LightingDirection.Top; shape.ThreeDFormat.Material = MaterialPresetType.Flat; shape.ThreeDFormat.ExtrusionHeight = 100; shape.ThreeDFormat.ExtrusionColor.Color = Color.Purple; ``` The [IThreeDFormat.Depth](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/depth) property sets the depth of a 3D shape. The [ExtrusionHeight](https://reference.aspose.com/slides/net/aspose.slides/ithreedformat/properties/extrusionheight) property controls the height of the extrusion effect, as shown in this example. ## **Use Gradient or Picture Fills with 3D Effects** 3D formatting is independent of the shape fill. You can apply a solid color, gradient, pattern, or picture fill to the front face and still use the same camera, light, material, and extrusion settings. This example applies a blue-to-orange gradient to the front face and a dark orange color to the 150-point extrusion. The gradient stops at 0 and 100 mark the start and end of the gradient. The camera rotation values are in degrees. The slide is rendered to a PNG image at twice its default dimensions: ```csharp using System.Drawing; using Aspose.Slides; const float imageScale = 2; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 150, 250, 250); shape.TextFrame.Text = "3D Gradient"; shape.TextFrame.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontHeight = 64; shape.FillFormat.FillType = FillType.Gradient; shape.FillFormat.GradientFormat.GradientStops.Add(0, Color.Blue); shape.FillFormat.GradientFormat.GradientStops.Add(100, Color.Orange); shape.ThreeDFormat.Camera.CameraType = CameraPresetType.OrthographicFront; shape.ThreeDFormat.Camera.SetRotation(10, 20, 30); shape.ThreeDFormat.LightRig.LightType = LightRigPresetType.Flat; shape.ThreeDFormat.LightRig.Direction = LightingDirection.Top; shape.ThreeDFormat.Material = MaterialPresetType.Flat; shape.ThreeDFormat.ExtrusionHeight = 150; shape.ThreeDFormat.ExtrusionColor.Color = Color.DarkOrange; using var thumbnail = slide.GetImage(imageScale, imageScale); thumbnail.Save("gradient_3d.png"); ``` The rendered output keeps the gradient on the front face and renders the extrusion separately: ![Rendered 3D rectangle with a blue-to-orange gradient fill and orange extrusion](https://docs.aspose.com/slides/net/3d-presentation/img_02_03.png) To use a picture fill instead, add the image to the presentation and assign it to the shape fill. This example requires an existing file named "image.jpg" in the working directory. It stretches the picture to fill the rectangle, applies a 150-point extrusion, and sets the camera rotation in degrees. It configures the shape in memory without saving or rendering a file: ```csharp using System.Drawing; using System.IO; using Aspose.Slides; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 150, 250, 250); var imageData = File.ReadAllBytes("image.jpg"); var image = presentation.Images.AddImage(imageData); shape.FillFormat.FillType = FillType.Picture; shape.FillFormat.PictureFillFormat.Picture.Image = image; shape.FillFormat.PictureFillFormat.PictureFillMode = PictureFillMode.Stretch; shape.ThreeDFormat.Camera.CameraType = CameraPresetType.OrthographicFront; shape.ThreeDFormat.Camera.SetRotation(10, 20, 30); shape.ThreeDFormat.LightRig.LightType = LightRigPresetType.Flat; shape.ThreeDFormat.LightRig.Direction = LightingDirection.Top; shape.ThreeDFormat.Material = MaterialPresetType.Flat; shape.ThreeDFormat.ExtrusionHeight = 150; shape.ThreeDFormat.ExtrusionColor.Color = Color.DarkOrange; ``` The picture is rendered on the front face, while the extrusion is rendered as the 3D side surface: ![Rendered 3D rectangle with a photo fill on the front face and orange extrusion](https://docs.aspose.com/slides/net/3d-presentation/img_02_04.png) ## **Apply 3D Formatting to Text** Shape 3D formatting affects the shape body. Text 3D formatting affects the text frame. This is useful for WordArt-like effects where the letters themselves need extrusion, material, lighting, and camera settings. The following example creates text with an orange-and-white grid pattern, applies an upward arch, and configures 3D settings through [ITextFrameFormat.ThreeDFormat](https://reference.aspose.com/slides/net/aspose.slides/itextframeformat/properties/threedformat). The extrusion height and depth are in points, and the light rotation is in degrees. The shape fill and outline are hidden so that only the text is visible. The example renders a PNG image at twice the default slide dimensions and saves the presentation as PPTX: ```csharp using System.Drawing; using Aspose.Slides; using Aspose.Slides.Export; const float imageScale = 2; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 150, 250, 250); shape.FillFormat.FillType = FillType.NoFill; shape.LineFormat.FillFormat.FillType = FillType.NoFill; shape.TextFrame.Text = "3D Text"; var portion = shape.TextFrame.Paragraphs[0].Portions[0]; portion.PortionFormat.FillFormat.FillType = FillType.Pattern; portion.PortionFormat.FillFormat.PatternFormat.ForeColor.Color = Color.DarkOrange; portion.PortionFormat.FillFormat.PatternFormat.BackColor.Color = Color.White; portion.PortionFormat.FillFormat.PatternFormat.PatternStyle = PatternStyle.LargeGrid; shape.TextFrame.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontHeight = 128; var textFrameFormat = shape.TextFrame.TextFrameFormat; textFrameFormat.Transform = TextShapeType.ArchUp; textFrameFormat.ThreeDFormat.ExtrusionHeight = 3.5f; textFrameFormat.ThreeDFormat.Depth = 3; textFrameFormat.ThreeDFormat.Material = MaterialPresetType.Plastic; textFrameFormat.ThreeDFormat.LightRig.Direction = LightingDirection.Top; textFrameFormat.ThreeDFormat.LightRig.LightType = LightRigPresetType.Balanced; textFrameFormat.ThreeDFormat.LightRig.SetRotation(0, 0, 40); textFrameFormat.ThreeDFormat.Camera.CameraType = CameraPresetType.PerspectiveContrastingRightFacing; using var thumbnail = slide.GetImage(imageScale, imageScale); thumbnail.Save("text_3d.png"); presentation.Save("text_3d.pptx", SaveFormat.Pptx); ``` The text is rendered as curved, extruded 3D lettering: ![Rendered 3D text with an arched WordArt transform, orange pattern fill, and dark extrusion](https://docs.aspose.com/slides/net/3d-presentation/img_02_05.png) ## **Keep Text Flat on a 3D Shape** To keep text readable while preserving a shape's 3D appearance, set [ITextFrameFormat.KeepTextFlat](https://reference.aspose.com/slides/net/aspose.slides/itextframeformat/keeptextflat/) through [ITextFrame.TextFrameFormat](https://reference.aspose.com/slides/net/aspose.slides/itextframe/textframeformat/). When the value is `true`, the text stays out of the 3D scene. When it is `false`, the text participates in the scene and follows its 3D orientation. This setting does not remove the shape's 3D formatting: its camera, lighting, material, and extrusion remain configured through [IShape.ThreeDFormat](https://reference.aspose.com/slides/net/aspose.slides/ishape/threedformat/). It is also different from ordinary rotation. [IShape.Rotation](https://reference.aspose.com/slides/net/aspose.slides/ishape/rotation/) rotates the shape in the slide plane, while [ITextFrameFormat.RotationAngle](https://reference.aspose.com/slides/net/aspose.slides/itextframeformat/rotationangle/) controls the text's custom rotation within its bounding box. Keeping text out of the 3D scene does not reset either of those angles. The following self-contained example creates a blue rectangle with text and clones it beside the original. Both shapes have the same 3D formatting; only the text setting differs: `false` on the left and `true` on the right. The camera angles are in degrees, and the extrusion height is 40 points. The example saves the presentation as PPTX and renders the comparison slide to PNG at twice its default dimensions. ```csharp using System.Drawing; using Aspose.Slides; using Aspose.Slides.Export; using var presentation = new Presentation(); var slide = presentation.Slides[0]; var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 70, 160, 240, 140); shape.TextFrame.Text = "Readable text"; shape.TextFrame.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontHeight = 28; shape.TextFrame.Paragraphs[0].ParagraphFormat.Alignment = TextAlignment.Center; shape.TextFrame.TextFrameFormat.AnchoringType = TextAnchorType.Center; shape.FillFormat.FillType = FillType.Solid; shape.FillFormat.SolidFillColor.Color = Color.CornflowerBlue; shape.ThreeDFormat.Camera.CameraType = CameraPresetType.OrthographicFront; shape.ThreeDFormat.Camera.SetRotation(30, 30, 0); shape.ThreeDFormat.LightRig.LightType = LightRigPresetType.Flat; shape.ThreeDFormat.LightRig.Direction = LightingDirection.Top; shape.ThreeDFormat.Material = MaterialPresetType.Flat; shape.ThreeDFormat.ExtrusionHeight = 40; shape.ThreeDFormat.ExtrusionColor.Color = Color.RoyalBlue; shape.TextFrame.TextFrameFormat.KeepTextFlat = false; var flatTextShape = (IAutoShape)slide.Shapes.AddClone(shape, 400, 160); flatTextShape.TextFrame.TextFrameFormat.KeepTextFlat = true; presentation.Save("keep_text_flat.pptx", SaveFormat.Pptx); using var image = slide.GetImage(2, 2); image.Save("keep_text_flat.png"); ``` On the left, the text follows the 3D orientation. On the right, it stays flat and easier to read. Both rectangles retain the same visible extrusion and 3D orientation. ![Side-by-side 3D rectangles: KeepTextFlat is false on the left and true on the right](https://docs.aspose.com/slides/net/3d-presentation/keep_text_flat.png) ## **Export and Rendering Behavior** Aspose.Slides preserves 3D formatting when saving to PowerPoint formats such as PPTX. When rendering or exporting to fixed-layout formats, the 3D scene is rasterized or drawn into the output as a 2D result. This applies when you render slides to [PNG](https://docs.aspose.com/slides/net/convert-powerpoint-to-png/), export to [PDF](https://docs.aspose.com/slides/net/convert-powerpoint-to-pdf/), export to [HTML](https://docs.aspose.com/slides/net/convert-powerpoint-to-html/), or generate frames for [video conversion](https://docs.aspose.com/slides/net/convert-powerpoint-to-video/). Keep these points in mind: - Exported images and PDFs are not interactive. The object cannot be rotated by the viewer after export. - The final appearance depends on the combination of camera, light rig, material, extrusion, fill, and slide scaling. - If you need to inspect inherited or theme-based formatting values, read the [effective shape properties](https://docs.aspose.com/slides/net/shape-effective-properties/). - Some output formats cannot store editable PowerPoint 3D formatting. In those formats, the visual result is rendered rather than preserved as editable 3D settings. ## **FAQ** **Can Aspose.Slides create interactive 3D presentations?** Aspose.Slides creates and renders PowerPoint 3D effects for shapes and text. It does not make exported images, PDFs, or HTML pages interactive 3D scenes that a viewer can rotate. In PPTX, the 3D formatting remains editable in PowerPoint where the format supports it. **What is the difference between a 3D model and a 3D effect?** A 3D model is a separate 3D object inserted into a presentation. A 3D effect is formatting applied to a regular PowerPoint shape or text, such as rotation, extrusion, bevel, lighting, and material. This article covers 3D effects. **Which settings are required for a visible 3D shape?** At minimum, set a camera rotation and either extrusion or depth. In practice, also set a light rig and material so the rendered faces have clear highlights and shadows. **Can I apply 3D effects to both shapes and text?** Yes. Use [IShape.ThreeDFormat](https://reference.aspose.com/slides/net/aspose.slides/ishape/properties/threedformat) for the shape body and [ITextFrameFormat.ThreeDFormat](https://reference.aspose.com/slides/net/aspose.slides/itextframeformat/properties/threedformat) for text. **Will 3D effects appear when exporting to images, PDF, HTML, or video frames?** Yes. Aspose.Slides renders 3D effects when producing slide images, PDF output, HTML output, and frames used for video conversion. The exported output contains the rendered appearance, not an editable 3D object. **Can I read the final 3D values after inheritance and theme settings are applied?** Yes. Use the effective formatting APIs described in [Shape Effective Properties](https://docs.aspose.com/slides/net/shape-effective-properties/) to read final camera, light rig, bevel, and related 3D values. ## Related features - [Apply 3D effects to shapes](https://docs.aspose.com/slides/features/shape-3d-effects/) # Access OpenDocument Presentation > Source: https://docs.aspose.com/slides/net/access-opendocument-presentation/ Updated: 2026-08-05 Aspose.Slides for .NET offers **Presentation** class that represents a presentation file.**Presentation** class can now also access **ODP** through **Presentation** constructor when the object is instantiated. ## **Example** ``` csharp using Aspose.Slides; using Aspose.Slides.Export; string FilePath = @"..\..\..\Sample Files\"; string srcFileName = FilePath + "OpenDocument Presentation.odp"; string destFileName = FilePath + "OpenDocument Presentation.pptx"; //Instantiate a Presentation object that represents a presentation file using (Presentation pres = new Presentation(srcFileName)) { //Saving the PPTX presentation to PPTX format pres.Save(destFileName, SaveFormat.Pptx); } ``` ## **Download Sample Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/MissingFeaturesAsposeSlidesForOpenXMLv1.1) ## **Download Running Example** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/OpenXML/Missing%20Features/OpenDocument%20Presentation) # Access Presentation Slides in .NET > Learn how to access and manage slides in PowerPoint and OpenDocument presentations with Aspose.Slides for .NET. Boost productivity with code examples. Source: https://docs.aspose.com/slides/net/access-slide-in-presentation/ Updated: 2026-08-05 ## **Overview** This article explains how to access and manage slides in a presentation using Aspose.Slides. It shows how to retrieve slides by their zero-based index from the `Slides` collection and how to access a slide by its unique ID using the `GetSlideById` method. You will also learn how to change a slide’s position by setting the `SlideNumber` property and how to define the starting slide number for a presentation with the `FirstSlideNumber` property. The examples demonstrate loading a presentation, getting slide references, updating slide order or numbering, and saving the modified presentation. ## **Access a Slide by Index** All slides in a presentation are arranged numerically based on the slide position starting from 0. The first slide is accessible through index 0; the second slide is accessed through index 1; etc. The Presentation class, representing a presentation file, exposes all slides as an [ISlideCollection](https://reference.aspose.com/slides/net/aspose.slides/islidecollection) collection (collection of [ISlide](https://reference.aspose.com/slides/net/aspose.slides/islide/) objects). This C# code shows you how to access a slide through its index: ```c# using Aspose.Slides; // Instantiates a Presentation object that represents a presentation file Presentation presentation = new Presentation("AccessSlides.pptx"); // Gets a slide's reference through its index ISlide slide = presentation.Slides[0]; ``` ## **Access a Slide by ID** Each slide in a presentation has a unique ID associated with it. You can use the [GetSlideById](https://reference.aspose.com/slides/net/aspose.slides/presentation/methods/getslidebyid) method (exposed by the [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation) class) to target that ID. This C# code shows you how to provide a valid slide ID and access that slide through the [GetSlideById](https://reference.aspose.com/slides/net/aspose.slides/presentation/methods/getslidebyid) method: ```c# using Aspose.Slides; // Instantiates a Presentation object that represents a presentation file Presentation presentation = new Presentation("AccessSlides.pptx"); // Gets a slide ID uint id = presentation.Slides[0].SlideId; // Accesses the slide through its ID IBaseSlide slide = presentation.GetSlideById(id); ``` ## **Change Slide Position** Aspose.Slides allow you to change a slide position. For example, you can specify that the first slide should become the second slide. 1. Create an instance of the [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation) class. 1. Get the slide's reference (whose position you want to change) through its index 1. Set a new position for the slide through the [SlideNumber](https://reference.aspose.com/slides/net/aspose.slides/islide/slidenumber/) property. 1. Save the modified presentation. This C# code demonstrates an operation in which the slide in position 1 is moved to position 2: ```c# using Aspose.Slides; using Aspose.Slides.Export; // Instantiates a Presentation object that represents a presentation file using (Presentation pres = new Presentation("ChangePosition.pptx")) { // Gets the slide whose position will be changed ISlide sld = pres.Slides[0]; // Sets the new position for the slide sld.SlideNumber = 2; // Saves the modified presentation pres.Save("Aspose_out.pptx", SaveFormat.Pptx); } ``` The first slide became the second; the second slide became the first. When you change a slide's position, other slides are automatically adjusted. ## **Set the Slide Number** Using the [FirstSlideNumber](https://reference.aspose.com/slides/net/aspose.slides/presentation/firstslidenumber/) property (exposed by the [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation) class), you can specify a new number for the first slide in a presentation. This operation causes other slide numbers to be recalculated. 1. Create an instance of the [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation) class. 1. Get the slide number. 1. Set the slide number. 1. Save the modified presentation. This C# code demonstrates an operation where the first slide number is set to 10: ```c# using Aspose.Slides; using Aspose.Slides.Export; // Instantiates a Presentation object that represents a presentation file using (Presentation presentation = new Presentation("HelloWorld.pptx")) { // Gets the slide number int firstSlideNumber = presentation.FirstSlideNumber; // Sets the slide number presentation.FirstSlideNumber=10; // Saves the modified presentation presentation.Save("Set_Slide_Number_out.pptx", SaveFormat.Pptx); } ``` If you prefer to skip the first slide, you can start the numbering from the second slide (and hide the numbering for the first slide) this way: ```c# using Aspose.Slides; using Aspose.Slides.Export; using (var presentation = new Presentation()) { var layoutSlide = presentation.LayoutSlides.GetByType(SlideLayoutType.Blank); presentation.Slides.AddEmptySlide(layoutSlide); presentation.Slides.AddEmptySlide(layoutSlide); presentation.Slides.AddEmptySlide(layoutSlide); // Sets the number for the first presentation slide presentation.FirstSlideNumber = 0; // Shows slide numbers for all slides presentation.HeaderFooterManager.SetAllSlideNumbersVisibility(true); // Hides the slide number for the first slide presentation.Slides[0].HeaderFooterManager.SetSlideNumberVisibility(false); // Saves the modified presentation presentation.Save("output.pptx", SaveFormat.Pptx); } ``` ## **FAQ** ### Does the slide number a user sees match the collection’s zero-based index? The number shown on a slide can start from an arbitrary value (e.g., 10) and does not have to match the index; the relationship is controlled by the presentation’s [first slide number](https://reference.aspose.com/slides/net/aspose.slides/presentation/firstslidenumber/) setting. ### Do hidden slides affect indexing? Yes. A hidden slide remains in the collection and is counted in indexing; "hidden" refers to display, not its position in the collection. ### Does a slide’s index change when other slides are added or removed? Yes. Indexes always reflect the current order in slides and are recalculated upon insert, delete, and move operations. # Manage ActiveX Controls in Presentations in .NET > Learn how Aspose.Slides for .NET leverages ActiveX to automate and enhance PowerPoint presentations, giving developers powerful control over slides. Source: https://docs.aspose.com/slides/net/activex/ Updated: 2026-08-05 ## **Introduction** ActiveX controls are used in presentations. Aspose.Slides for .NET lets you manage ActiveX controls, but managing them is bit trickier and different from normal presentation shapes. From Aspose.Slides for .NET 6.9.0, the component supports managing ActiveX controls. At the moment, you can access already added ActiveX control in your presentation and modify or delete it by using its various properties. Remember, ActiveX controls are not shapes and are not part of the presentation's IShapeCollection but the separate IControlCollection. This article shows how to work with them. ## **Modify ActiveX Controls** To manage a simple ActiveX control like a text box and simple command button on a slide: 1. Create an instance of the Presentation class and load the presentation with ActiveX controls in it. 1. Obtain a slide reference by its index. 1. Access the ActiveX controls in the slide by accessing the IControlCollection. 1. Access the TextBox1 ActiveX control using the ControlEx object. 1. Change the different properties of the TextBox1 ActiveX control including text, font, font height and frame position. 1. Access the second access control called CommandButton1. 1. Change the button caption, font and position. 1. Shift the position of the ActiveX controls frames. 1. Write the modified presentation to a PPTX file. The code snippet below updates the ActiveX controls on the presentation slides to the slide as shown below. ```c# using System.Drawing; using Aspose.Slides; // Accessing the presentation with ActiveX controls Presentation presentation = new Presentation("ActiveX.pptm"); // Accessing the first slide in presentation ISlide slide = presentation.Slides[0]; // changing TextBox text IControl control = slide.Controls[0]; if (control.Name == "TextBox1" && control.Properties != null) { string newText = "Changed text"; control.Properties["Value"] = newText; // changing substitute image. Powerpoint will replace this image during activeX activation, so sometime it's OK to leave image unchanged. Bitmap image = new Bitmap((int)control.Frame.Width, (int)control.Frame.Height); Graphics graphics = Graphics.FromImage(image); Brush brush = new SolidBrush(Color.FromKnownColor(KnownColor.Window)); graphics.FillRectangle(brush, 0, 0, image.Width, image.Height); brush.Dispose(); System.Drawing.Font font = new System.Drawing.Font(control.Properties["FontName"], 14); brush = new SolidBrush(Color.FromKnownColor(KnownColor.WindowText)); graphics.DrawString(newText, font, brush, 10, 4); brush.Dispose(); Pen pen = new Pen(Color.FromKnownColor(KnownColor.ControlDark), 1); graphics.DrawLines( pen, new System.Drawing.Point[] { new System.Drawing.Point(0, image.Height - 1), new System.Drawing.Point(0, 0), new System.Drawing.Point(image.Width - 1, 0) }); pen.Dispose(); pen = new Pen(Color.FromKnownColor(KnownColor.ControlDarkDark), 1); graphics.DrawLines(pen, new System.Drawing.Point[] { new System.Drawing.Point(1, image.Height - 2), new System.Drawing.Point(1, 1), new System.Drawing.Point(image.Width - 2, 1) }); pen.Dispose(); pen = new Pen(Color.FromKnownColor(KnownColor.ControlLight), 1); graphics.DrawLines(pen, new System.Drawing.Point[] { new System.Drawing.Point(1, image.Height - 1), new System.Drawing.Point(image.Width - 1, image.Height - 1), new System.Drawing.Point(image.Width - 1, 1) }); pen.Dispose(); pen = new Pen(Color.FromKnownColor(KnownColor.ControlLightLight), 1); graphics.DrawLines(pen,new System.Drawing.Point[] { new System.Drawing.Point(0, image.Height), new System.Drawing.Point(image.Width, image.Height), new System.Drawing.Point(image.Width, 0) }); pen.Dispose(); graphics.Dispose(); using (MemoryStream imageStream = new MemoryStream()) { image.Save(imageStream, System.Drawing.Imaging.ImageFormat.Png); imageStream.Position = 0; control.SubstitutePictureFormat.Picture.Image = presentation.Images.AddImage(imageStream); } } // changing Button caption control = slide.Controls[1]; if (control.Name == "CommandButton1" && control.Properties != null) { String newCaption = "MessageBox"; control.Properties["Caption"] = newCaption; // changing substitute Bitmap image = new Bitmap((int)control.Frame.Width, (int)control.Frame.Height); Graphics graphics = Graphics.FromImage(image); Brush brush = new SolidBrush(Color.FromKnownColor(KnownColor.Control)); graphics.FillRectangle(brush, 0, 0, image.Width, image.Height); brush.Dispose(); System.Drawing.Font font = new System.Drawing.Font(control.Properties["FontName"], 14); brush = new SolidBrush(Color.FromKnownColor(KnownColor.WindowText)); SizeF textSize = graphics.MeasureString(newCaption, font, int.MaxValue); graphics.DrawString(newCaption, font, brush, (image.Width - textSize.Width) / 2, (image.Height - textSize.Height) / 2); brush.Dispose(); Pen pen = new Pen(Color.FromKnownColor(KnownColor.ControlLightLight), 1); graphics.DrawLines(pen, new System.Drawing.Point[] { new System.Drawing.Point(0, image.Height - 1), new System.Drawing.Point(0, 0), new System.Drawing.Point(image.Width - 1, 0) }); pen.Dispose(); pen = new Pen(Color.FromKnownColor(KnownColor.ControlLight), 1); graphics.DrawLines(pen, new System.Drawing.Point[] { new System.Drawing.Point(1, image.Height - 2), new System.Drawing.Point(1, 1), new System.Drawing.Point(image.Width - 2, 1) }); pen.Dispose(); pen = new Pen(Color.FromKnownColor(KnownColor.ControlDark), 1); graphics.DrawLines(pen,new System.Drawing.Point[] { new System.Drawing.Point(1, image.Height - 1), new System.Drawing.Point(image.Width - 1, image.Height - 1), new System.Drawing.Point(image.Width - 1, 1) }); pen.Dispose(); pen = new Pen(Color.FromKnownColor(KnownColor.ControlDarkDark), 1); graphics.DrawLines(pen,new System.Drawing.Point[] { new System.Drawing.Point(0, image.Height), new System.Drawing.Point(image.Width, image.Height), new System.Drawing.Point(image.Width, 0) }); pen.Dispose(); graphics.Dispose(); using (MemoryStream imageStream = new MemoryStream()) { image.Save(imageStream, System.Drawing.Imaging.ImageFormat.Png); imageStream.Position = 0; control.SubstitutePictureFormat.Picture.Image = presentation.Images.AddImage(imageStream); } } // Moving ActiveX frames 100 points down foreach (IControl ctl in slide.Controls) { IShapeFrame frame = ctl.Frame; ctl.Frame = new ShapeFrame( frame.X, frame.Y + 100, frame.Width, frame.Height, frame.FlipH, frame.FlipV, frame.Rotation); } // Save the presentation with Edited ActiveX Controls presentation.Save("withActiveX-edited_out.pptm", Aspose.Slides.Export.SaveFormat.Pptm); // Now removing controls slide.Controls.Clear(); // Saving the presentation with cleared ActiveX controls presentation.Save("withActiveX.cleared_out.pptm", Aspose.Slides.Export.SaveFormat.Pptm); ``` ## **Add an ActiveX Media Player Control** To add ActiveX Media Player control, please perform following steps: 1. Create an instance of the Presentation class and load the sample presentation with Media Player ActiveX controls in it. 1. Create an instance of target Presentation class and generate empty presentation instance. 1. Clone the slide with Media Player ActiveX control in template presentation to target Presentation. 1. Access the cloned slide in target Presentation. 1. Access the ActiveX controls in the slide by accessing the IControlCollection. 1. Access the Media Player ActiveX control and set the video path by using its properties. 1. Save the presentation to a PPTX file. ```c# using Aspose.Slides; // Instantiate Presentation class that represents PPTX file Presentation presentation = new Presentation("template.pptx"); // Create empty presentation instance Presentation newPresentation = new Presentation(); // Remove default slide newPresentation.Slides.RemoveAt(0); // Clone slide with Media Player ActiveX Control newPresentation.Slides.InsertClone(0, presentation.Slides[0]); // Access the Media Player ActiveX control and set the video path newPresentation.Slides[0].Controls[0].Properties["URL"] = "Wildlife.mp4"; // Save the Presentation newPresentation.Save("LinkingVideoActiveXControl_out.pptx", Aspose.Slides.Export.SaveFormat.Pptx); ``` ## **FAQ** ### Does Aspose.Slides preserve ActiveX controls when reading and re-saving if they cannot be executed in the .NET runtime? Yes. Aspose.Slides treats them as part of the presentation and can read/modify their properties and frames; executing the controls themselves is not required to preserve them. ### How do ActiveX controls differ from OLE objects in a presentation? ActiveX controls are interactive managed controls (buttons, text boxes, media player), whereas [OLE](https://docs.aspose.com/slides/net/manage-ole/) refers to embedded application objects (for example, an Excel worksheet). They are stored and handled differently and have different property models. ### Do ActiveX events and VBA macros work if the file has been modified by Aspose.Slides? Aspose.Slides preserves the existing markup and metadata; however, events and macros run only inside PowerPoint on Windows when security allows it. The library does not execute VBA. ## Related features - [Work with ActiveX controls](https://docs.aspose.com/slides/features/activex-controls/) ## Related articles - [ActiveX](https://docs.aspose.com/slides/net/examples/elements/activex/) # Add a comment to a slide > Source: https://docs.aspose.com/slides/net/add-a-comment-to-a-slide/ Updated: 2026-08-05 ## **OpenXML Presentation** ``` csharp string FilePath = @"..\..\..\..\Sample Files\"; string FileName = FilePath + "Add a comment to a slide.pptx"; AddCommentToPresentation(FileName, "Zeeshan", "MZ", "This is my programmatically added comment."); // Adds a comment to the first slide of the presentation document. // The presentation document must contain at least one slide. private static void AddCommentToPresentation(string file, string initials, string name, string text) { using (PresentationDocument doc = PresentationDocument.Open(file, true)) { // Declare a CommentAuthorsPart object. CommentAuthorsPart authorsPart; // Verify that there is an existing comment authors part. if (doc.PresentationPart.CommentAuthorsPart == null) { // If not, add a new one. authorsPart = doc.PresentationPart.AddNewPart(); } else { authorsPart = doc.PresentationPart.CommentAuthorsPart; } // Verify that there is a comment author list in the comment authors part. if (authorsPart.CommentAuthorList == null) { // If not, add a new one. authorsPart.CommentAuthorList = new CommentAuthorList(); } // Declare a new author ID. uint authorId = 0; CommentAuthor author = null; // If there are existing child elements in the comment authors list... if (authorsPart.CommentAuthorList.HasChildren) { // Verify that the author passed in is on the list. var authors = authorsPart.CommentAuthorList.Elements().Where(a => a.Name == name && a.Initials == initials); // If so... if (authors.Any()) { // Assign the new comment author the existing author ID. author = authors.First(); authorId = author.Id; } // If not... if (author == null) { // Assign the author passed in a new ID authorId = authorsPart.CommentAuthorList.Elements().Select(a => a.Id.Value).Max(); } } // If there are no existing child elements in the comment authors list. if (author == null) { authorId++; // Add a new child element(comment author) to the comment author list. author = authorsPart.CommentAuthorList.AppendChild (new CommentAuthor() { Id = authorId, Name = name, Initials = initials, ColorIndex = 0 }); } // Get the first slide, using the GetFirstSlide method. SlidePart slidePart1 = GetFirstSlide(doc); // Declare a comments part. SlideCommentsPart commentsPart; // Verify that there is a comments part in the first slide part. if (slidePart1.GetPartsOfType().Count() == 0) { // If not, add a new comments part. commentsPart = slidePart1.AddNewPart(); } else { // Else, use the first comments part in the slide part. commentsPart = slidePart1.GetPartsOfType().First(); } // If the comment list does not exist. if (commentsPart.CommentList == null) { // Add a new comments list. commentsPart.CommentList = new CommentList(); } // Get the new comment ID. uint commentIdx = author.LastIndex == null ? 1 : author.LastIndex + 1; author.LastIndex = commentIdx; // Add a new comment. Comment comment = commentsPart.CommentList.AppendChild( new Comment() { AuthorId = authorId, Index = commentIdx, DateTime = DateTime.Now }); // Add the position child node to the comment element. comment.Append( new Position() { X = 100, Y = 200 }, new Text() { Text = text }); // Save the comment authors part. authorsPart.CommentAuthorList.Save(); // Save the comments part. commentsPart.CommentList.Save(); } } // Get the slide part of the first slide in the presentation document. private static SlidePart GetFirstSlide(PresentationDocument presentationDocument) { // Get relationship ID of the first slide PresentationPart part = presentationDocument.PresentationPart; SlideId slideId = part.Presentation.SlideIdList.GetFirstChild(); string relId = slideId.RelationshipId; // Get the slide part by the relationship ID. SlidePart slidePart = (SlidePart)part.GetPartById(relId); return slidePart; } ``` ## **Aspose.Slides** In **Aspose.Slides** for .NET, the PPT slide comment collection is included in every **Slide** class. The **CommentCollection** class is used to hold the particular slide comments. The **Comment** class include information like author who added slide comment, his initials, time of creation, the position of slide comment on slide and the comment text. The **CommentAuthor** class is used to add the authors for slide comments on presentation level. The **Presentation** class holds the collection of authors for presentation in **CommentAuthors** class. In the following example, we have added the code snippet for adding the slide comments. ``` csharp using System.Drawing; using Aspose.Slides; string FilePath = @"..\..\..\..\Sample Files\"; string FileName = FilePath + "Add a comment to a slide.pptx"; using (Presentation pres = new Presentation()) { //Adding Empty slide pres.Slides.AddEmptySlide(pres.LayoutSlides[0]); //Adding Autthor ICommentAuthor author = pres.CommentAuthors.AddAuthor("Zeeshan", "MZ"); //Position of comments PointF point = new PointF(); point.X = 1; point.Y = 1; //Adding slide comment for an author on slide author.Comments.AddComment("Hello Zeeshan, this is slide comment", pres.Slides[0], point, DateTime.Now); pres.Save(FileName, Aspose.Slides.Export.SaveFormat.Pptx); } ``` ## **Download Sample Code** - [GitHub](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/AsposeSlidesVsOpenXML1.1) - [Sourceforge](https://sourceforge.net/projects/asposeopenxml/files/Aspose.Slides%20Vs%20OpenXML/Add%20a%20comment%20to%20a%20slide%20%28Aspose.Slides%29.zip/download) - [Bitbucket](https://bitbucket.org/asposemarketplace/aspose-for-openxml/src/master/Aspose.Slides%20Vs%20OpenXML/Add%20a%20comment%20to%20a%20slide/) ## Related articles - [Manage Presentation Comments in .NET](https://docs.aspose.com/slides/net/presentation-comments/) - [Comment](https://docs.aspose.com/slides/net/examples/elements/comment/) # Add Image in Table Cell > Source: https://docs.aspose.com/slides/net/add-image-in-table-cell/ Updated: 2026-08-05 ## **VSTO** Below is the code for adding image in Table cell: ``` csharp using Aspose.Slides; //Open Prsentation class that contains the table string FileName = "Adding Image in Table Cell.pptx"; string ImageFile = "AsposeLogo.jpg"; Presentation pres = Application.Presentations.Open(FileName); //Get the first slide Slide sld = pres.Slides[1]; foreach (Shape shp in sld.Shapes) { if (shp.HasTable == Microsoft.Office.Core.MsoTriState.msoTrue) { Cell cell= shp.Table.Rows[1].Cells[1]; cell.Shape.Fill.UserPicture(ImageFile); } } ``` ## **Aspose.Slides** Aspose.Slides for .NET has provided the simplest API to work with tables in an easiest way. To add image in a cell of a table that already exists in a presentation, please follow the steps below: - Create an instance of Presentation class from the file that contains the table - Obtain the reference of a slide by using its Index - Load the image file into an IImage object using the Images.FromFile method - Add the loaded image to the presentation's image collection to get an IPPImage object - Find the table among the shapes of the slide - Set Fill Format of the Table Cell as Picture - Add the image to the first cell of the table - Save the modified presentation as a PPTX file ``` csharp using Aspose.Slides; using Aspose.Slides.Export; string fileName = "Adding Image in Table Cell.pptx"; string imageFile = "AsposeLogo.jpg"; using Presentation presentation = new Presentation(fileName); //Get First Slide ISlide sld = presentation.Slides[0]; //Load the image file using IImage image = Images.FromFile(imageFile); //Create an IPPImage object using the loaded image IPPImage imgx1 = presentation.Images.AddImage(image); foreach (IShape shp in sld.Shapes) { if (shp is ITable tbl) { //Add image to first table cell tbl[0, 0].CellFormat.FillFormat.FillType = FillType.Picture; tbl[0, 0].CellFormat.FillFormat.PictureFillFormat.PictureFillMode = PictureFillMode.Stretch; tbl[0, 0].CellFormat.FillFormat.PictureFillFormat.Picture.Image = imgx1; } } //Save PPTX to Disk presentation.Save(fileName, SaveFormat.Pptx); ``` ## **Download Running Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/AsposeSlidesVsVSTOv1.1) ## **Download Sample Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/Aspose.Slides%20Vs%20VSTO%20Presentations/Code%20Comparison%20of%20Common%20Features/Adding%20image%20in%20table%20cell) ## Related articles - [Removing row or column in Table in VSTO and Aspose.Slides](https://docs.aspose.com/slides/net/removing-row-or-column-in-table-in-vsto-and-aspose-slides/) - [Creating a Table on PowerPoint Slide in VSTO and Aspose.Slides](https://docs.aspose.com/slides/net/creating-a-table-on-powerpoint-slide-in-vsto-and-aspose-slides/) - [Adding Shapes to Presentation](https://docs.aspose.com/slides/net/adding-shapes-to-presentation/) # Add layout Slide to Presentation > Source: https://docs.aspose.com/slides/net/add-layout-slide-to-presentation/ Updated: 2026-08-13 Aspose.Slides for .NET allows developers to add new Layout slides in presentation. To add a Layout Slide, please follow the steps below: - Create an instance of Presentation class - Access the Master Slide collection - Try to find existing Layout slides to see if the required one is already available in Layout Slide collection or not - Add a new Layout slide if the desired layout is unavailable - Add an empty slide with newly added Layout slide - Finally, write the presentation file using the Presentation object. ## **Example** ``` csharp using Aspose.Slides; using Aspose.Slides.Export; //Instantiate Presentation class that represents the presentation file using (Presentation p = new Presentation("Test.pptx")) { // Try to search by layout slide type IMasterLayoutSlideCollection layoutSlides = p.Masters[0].LayoutSlides; ILayoutSlide layoutSlide = layoutSlides.GetByType(SlideLayoutType.TitleAndObject) ?? layoutSlides.GetByType(SlideLayoutType.Title); if (layoutSlide == null) { // The situation when a presentation doesn't contain some type of layouts. // Technographics.pptx presentation only contains Blank and Custom layout types. // But layout slides with Custom types has different slide names, // like "Title", "Title and Content", etc. And it is possible to use these // names for layout slide selection. // Also it is possible to use the set of placeholder shape types. For example, // Title slide should have only Title pleceholder type, etc. foreach (ILayoutSlide titleAndObjectLayoutSlide in layoutSlides) { if (titleAndObjectLayoutSlide.Name == "Title and Object") { layoutSlide = titleAndObjectLayoutSlide; break; } } if (layoutSlide == null) { foreach (ILayoutSlide titleLayoutSlide in layoutSlides) { if (titleLayoutSlide.Name == "Title") { layoutSlide = titleLayoutSlide; break; } } if (layoutSlide == null) { layoutSlide = layoutSlides.GetByType(SlideLayoutType.Blank); if (layoutSlide == null) { layoutSlide = layoutSlides.Add(SlideLayoutType.TitleAndObject, "Title and Object"); } } } } //Adding empty slide with added layout slide p.Slides.InsertEmptySlide(0, layoutSlide); //Save presentation p.Save("Output.pptx", SaveFormat.Pptx); } ``` ## **Download Running Example** - [GitHub](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/Aspose.Slides%20Vs%20VSTO%20Presentations/Aspose.Slides%20Features%20missing%20in%20VSTO/Adding%20Layout%20Slides) ## **Download Sample Code** - [GitHub](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/Aspose.SlidesFeaturesmissingInVSTOv1.1) For more details, visit [Apply or Change Slide Layouts in .NET](https://docs.aspose.com/slides/net/slide-layout/). ## Related articles - [Add Layout Slides to Presentation](https://docs.aspose.com/slides/net/add-layout-slides-to-presentation/) - [Create Slide as SVG Image](https://docs.aspose.com/slides/net/create-slide-as-svg-image/) - [Convert Presentation to HTML](https://docs.aspose.com/slides/net/convert-presentation-to-html/) # Add Layout Slides to Presentation > Source: https://docs.aspose.com/slides/net/add-layout-slides-to-presentation/ Updated: 2026-08-13 Aspose.Slides for .NET allows developers to add new Layout slides in presentation. To add a Layout Slide, please follow the steps below: - Create an instance of Presentation class - Access the Master Slide collection - Try to find existing Layout slides to see if the required one is already available in Layout Slide collection or not - Add a new Layout slide if the desired layout is unavailable - Add an empty slide with newly added Layout slide - Finally, write the presentation file using the Presentation object ## **Example** ``` csharp using Aspose.Slides; using Aspose.Slides.Export; string FilePath = @"..\..\..\Sample Files\"; string FileName = FilePath + "Adding Layout Slides.pptx"; //Instantiate Presentation class that represents the presentation file using (Presentation p = new Presentation(FileName)) { // Try to search by layout slide type IMasterLayoutSlideCollection layoutSlides = p.Masters[0].LayoutSlides; ILayoutSlide layoutSlide = layoutSlides.GetByType(SlideLayoutType.TitleAndObject) ?? layoutSlides.GetByType(SlideLayoutType.Title); if (layoutSlide == null) { // The situation when a presentation doesn't contain some type of layouts. // Technographics.pptx presentation only contains Blank and Custom layout types. // But layout slides with Custom types has different slide names, // like "Title", "Title and Content", etc. And it is possible to use these // names for layout slide selection. // Also it is possible to use the set of placeholder shape types. For example, // Title slide should have only Title pleceholder type, etc. foreach (ILayoutSlide titleAndObjectLayoutSlide in layoutSlides) { if (titleAndObjectLayoutSlide.Name == "Title and Object") { layoutSlide = titleAndObjectLayoutSlide; break; } } if (layoutSlide == null) { foreach (ILayoutSlide titleLayoutSlide in layoutSlides) { if (titleLayoutSlide.Name == "Title") { layoutSlide = titleLayoutSlide; break; } } if (layoutSlide == null) { layoutSlide = layoutSlides.GetByType(SlideLayoutType.Blank); if (layoutSlide == null) { layoutSlide = layoutSlides.Add(SlideLayoutType.TitleAndObject, "Title and Object"); } } } } //Adding empty slide with added layout slide p.Slides.InsertEmptySlide(0, layoutSlide); //Save presentation p.Save(FileName, SaveFormat.Pptx); } ``` ## **Download Sample Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/MissingFeaturesAsposeSlidesForOpenXMLv1.1) ## **Download Running Example** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/OpenXML/Missing%20Features/Adding%20Layout%20Slides) For more details, visit [Apply or Change Slide Layouts in .NET](https://docs.aspose.com/slides/net/slide-layout/). ## Related articles - [Add layout Slide to Presentation](https://docs.aspose.com/slides/net/add-layout-slide-to-presentation/) - [Create Slide as SVG Image](https://docs.aspose.com/slides/net/create-slide-as-svg-image/) - [Convert Presentation to HTML](https://docs.aspose.com/slides/net/convert-presentation-to-html/) # Add Picture Frame to Presentation > Source: https://docs.aspose.com/slides/net/add-picture-frame-to-presentation/ Updated: 2026-08-05 ## **VSTO** Below is the code for adding picture in VSTO presentation: ``` csharp using Aspose.Slides; string ImageFilePath="AddPicture.jpg"; Slide slide = Application.ActivePresentation.Slides[1]; slide.Shapes.AddPicture(ImageFilePath, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 0, 0); ``` ## **Aspose.Slides** To add a simple picture frame to your slide, please follow the steps below: 1. Create an instance of the Presentation class. 1. Obtain the reference of a slide by using its index. 1. Create an Image object by adding an image to the Images collection associated with the Presentation object that will be used to fill the Shape. 1. Calculate the width and height of the image. 1. Create a PictureFrame according to the width and height of the image by using the AddPictureFrame method exposed by the Shapes object associated with the referenced slide. 1. Add a picture frame (containing the picture) to the slide. 1. Write the modified presentation as a PPTX file. The above steps are implemented in the example given below. ``` csharp using Aspose.Slides; string ImageFilePath = "AddPicture.jpg"; //Instantiate Prseetation class that represents the PPTX Presentation pres = new Presentation(); //Get the first slide ISlide sld = pres.Slides[0]; //Instantiate the ImageEx class using IImage img = Images.FromFile(ImageFilePath); IPPImage imgx = pres.Images.AddImage(img); //Add Picture Frame with height and width equivalent of Picture sld.Shapes.AddPictureFrame(ShapeType.Rectangle, 50, 150, imgx.Width, imgx.Height, imgx); ``` ## **Download Running Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/AsposeSlidesVsVSTOv1.1) ## **Download Sample Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/Aspose.Slides%20Vs%20VSTO%20Presentations/Code%20Comparison%20of%20Common%20Features/Add%20Picture%20Frame) ## Related articles - [Adding Shapes to Presentation](https://docs.aspose.com/slides/net/adding-shapes-to-presentation/) - [Adding Picture Frame with Animation in VSTO and Aspose.Slides](https://docs.aspose.com/slides/net/adding-picture-frame-with-animation-in-vsto-and-aspose-slides/) - [Add Image in Table Cell](https://docs.aspose.com/slides/net/add-image-in-table-cell/) # Add Slides to Presentations in .NET > Easily add slides to your PowerPoint and OpenDocument presentations using Aspose.Slides for .NET—seamless, efficient slide insertion in seconds. Source: https://docs.aspose.com/slides/net/add-slide-to-presentation/ Updated: 2026-08-02 ## **Overview** Aspose.Slides allows you to add slides to PowerPoint presentations programmatically. A presentation contains master/layout slides and normal slides, and normal slides are arranged by a zero-based index. Each slide has a unique ID, and presentation files without slides are not supported. This article explains how to create a `Presentation` object, access its slide collection, add an empty slide, work with the newly added slide, and save the updated presentation. It also covers related points such as inserting slides at a specific position, using layouts, and understanding the blank slide that exists in a newly created presentation. ## **Add a Slide to a Presentation** Before talking about adding slides to the presentation files, let us discuss some facts about the slides. Each PowerPoint presentation file contains Master / Layout slide and other Normal slides. It means that a presentation file contains at least one or more slides. It is important to know that presentation files without slides are not supported by Aspose.Slides for .NET. Each slide has a unique Id and all the Normal Slides are arranged in an order specified by the zero based index. Aspose.Slides for .NET allows developers to add empty slides to their presentation. To add an empty slide in the presentation, please follow the steps below: - Create an instance of [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation) class. - Instantiate [ISlideCollection](https://reference.aspose.com/slides/net/aspose.slides/islidecollection) class by setting a reference to the Slides (collection of content Slide objects) property exposed by the Presentation object. - Add an empty slide to the presentation at the end of the content slides collection by calling the AddEmptySlide methods exposed by ISlideCollection object - Do some work with the newly added empty slide. - Finally, write the presentation file using the [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation) object. ```csharp // For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-.NET // The path to the documents directory. string dataDir = RunExamples.GetDataDir_Slides_Presentations(); // Instantiate Presentation class that represents the presentation file using (Presentation presentation = new Presentation()) { // Instantiate SlideCollection calss ISlideCollection slide = presentation.Slides; for (int i = 0; i < presentation.LayoutSlides.Count; i++) { // Add an empty slide to the Slides collection slide.AddEmptySlide(presentation.LayoutSlides[i]); } // Save the PPTX file to the Disk presentation.Save(dataDir + "EmptySlide_out.pptx", Aspose.Slides.Export.SaveFormat.Pptx); } ``` [Source: Examples-CSharp-Slides-AddSlides-AddSlides.cs](https://gist.githubusercontent.com/aspose-slides/53249e5573d2cd6e66f91f708e8fe008/raw/c24e7b82f71395d380647aed5862122c5fe947bf/Examples-CSharp-Slides-AddSlides-AddSlides.cs) ## **FAQ** ### Can I insert a new slide at a specific position, not just at the end? Yes. The library supports slide collections and [insert](https://reference.aspose.com/slides/net/aspose.slides/slidecollection/insertemptyslide/)/[clone](https://reference.aspose.com/slides/net/aspose.slides/slidecollection/insertclone/) operations, so you can add a slide at the required index rather than only at the end. ### Are the theme/styles preserved when adding a slide based on a layout? Yes. A layout inherits formatting from its master, and the new slide inherits from the selected layout and its associated master. ### Which slide is present in a new "empty" presentation before adding slides? A newly created presentation already contains one blank slide with index zero. This is important to consider when calculating insertion indices. ### How do I choose the "right" layout for a new slide if the master has many options? Generally choose the [LayoutSlide](https://reference.aspose.com/slides/net/aspose.slides/layoutslide/) that matches the required structure ([Title and Content, Two Content, etc.](https://reference.aspose.com/slides/net/aspose.slides/slidelayouttype/)). If such a layout is missing, you can [add it to the master](https://docs.aspose.com/slides/net/slide-layout/) and then use it. ## Related features - [Add, remove and reorder slides](https://docs.aspose.com/slides/features/manage-slides/) ## Related articles - [Assemble Slides](https://docs.aspose.com/slides/net/assemble-slides/) - [Adding Slide to Presentation](https://docs.aspose.com/slides/net/adding-slide-to-presentation/) - [Add layout Slide to Presentation](https://docs.aspose.com/slides/net/add-layout-slide-to-presentation/) # Adding Picture Frame with Animation in VSTO and Aspose.Slides > Source: https://docs.aspose.com/slides/net/adding-picture-frame-with-animation-in-vsto-and-aspose-slides/ Updated: 2026-08-05 The code samples below create a presentation with a slide, add an image with a picture frame and applies animation to it. ## **VSTO** Using VSTO, take the following steps: 1. Create a presentation. 1. Add an empty slide. 1. Add a picture shape to the slide. 1. Apply animation to the picture. 1. Write the presentation to disk. ``` csharp //Creating empty presentation PowerPoint.Presentation pres = Globals.ThisAddIn.Application.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoFalse); //Add a blank slide PowerPoint.Slide sld = pres.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank); //Add Picture Frame PowerPoint.Shape PicFrame = sld.Shapes.AddPicture("pic.jpeg", Microsoft.Office.Core.MsoTriState.msoTriStateMixed, Microsoft.Office.Core.MsoTriState.msoTriStateMixed, 150, 100, 400, 300); //Applying animation on picture frame PicFrame.AnimationSettings.EntryEffect = Microsoft.Office.Interop.PowerPoint.PpEntryEffect.ppEffectBoxIn; //Saving Presentation pres.SaveAs("VSTOAnim.ppt", PowerPoint.PpSaveAsFileType.ppSaveAsPresentation, Microsoft.Office.Core.MsoTriState.msoFalse); ``` ## **Aspose.Slides** Using Aspose.Slides for .NET, perform the following steps: 1. Create a presentation. 1. Access the first slide. 1. Add an image to a picture collection. 1. Add a picture shape to the slide. 1. Apply animation to the picture. 1. Write the presentation to disk. ``` csharp using Aspose.Slides; using Aspose.Slides.Animation; using Aspose.Slides.Export; // Creating empty presentation using (Presentation pres = new Presentation()) { // Accessing the first slide ISlide slide = pres.Slides[0]; // Adding the image to the image collection of the presentation IImage image = Images.FromFile("pic.jpeg"); IPPImage ppImage = pres.Images.AddImage(image); image.Dispose(); // Adding Picture Frame IPictureFrame picFrame = slide.Shapes.AddPictureFrame(ShapeType.Rectangle, 150, 100, 400, 300, ppImage); // Applying animation on picture frame ISequence sequence = slide.Timeline.MainSequence; sequence.AddEffect(picFrame, EffectType.Box, EffectSubtype.In, EffectTriggerType.OnClick); // Saving Presentation pres.Save("AsposeAnim.ppt", SaveFormat.Ppt); } ``` ## **Download Sample Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/download/AsposeSlidesVsVSTOv1.1/Adding.Picture.Frame.with.Animation.Aspose.Slides.zip) - [Sourceforge](https://sourceforge.net/projects/asposevsto/files/Aspose.Slides%20Vs%20VSTO%20Slides/Adding%20Picture%20Frame%20with%20Animation%20%28Aspose.Slides%29.zip/download) - [Bitbucket](https://bitbucket.org/asposemarketplace/aspose-for-vsto/src/master/Aspose.Slides%20Vs%20VSTO%20Slides/Adding%20Picture%20Frame%20with%20Animation/) ## Related articles - [Adding Picture Frames with Animation Using VSTO and Aspose.Slides for .NET](https://docs.aspose.com/slides/net/adding-picture-frame-with-animation/) - [Creating a Table on PowerPoint Slide in VSTO and Aspose.Slides](https://docs.aspose.com/slides/net/creating-a-table-on-powerpoint-slide-in-vsto-and-aspose-slides/) - [Add Picture Frame to Presentation](https://docs.aspose.com/slides/net/add-picture-frame-to-presentation/) # Adding Picture Frames with Animation Using VSTO and Aspose.Slides for .NET > Migrate from Microsoft Office automation to Aspose.Slides for .NET and animate picture frames in PowerPoint (PPT, PPTX) slides with clean C# code. Source: https://docs.aspose.com/slides/net/adding-picture-frame-with-animation/ Updated: 2026-08-13 Picture frames are applied to shapes or images in Microsoft PowerPoint to frame images in a presentation. This article shows how to create a picture frame and apply animation on it programmatically using first [VSTO 2008](https://docs.aspose.com/slides/net/adding-picture-frame-with-animation/) and then [Aspose.Slides for .NET](https://docs.aspose.com/slides/net/adding-picture-frame-with-animation/). First, we show you how to apply a frame and animation using VSTO 2008. We then show you how to perform the same steps using Aspose.Slides for .NET. ## **Adding Picture Frames with Animation** The code samples below create a presentation with a slide, add an image with a picture frame and applies animation to it. ### **VSTO 2008 Example** Using VSTO 2008, take the following steps: 1. Create a presentation. 1. Add an empty slide. 1. Add a picture shape to the slide. 1. Apply animation to the picture. 1. Write the presentation to disk. **The output presentation, created with VSTO** ![todo:image_alt_text](https://docs.aspose.com/slides/net/adding-picture-frame-with-animation/adding-picture-frame-with-animation_1.png) ```c# //Creating empty presentation PowerPoint.Presentation pres = Globals.ThisAddIn.Application.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoFalse); //Add a blank slide PowerPoint.Slide sld = pres.Slides.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank); //Add Picture Frame PowerPoint.Shape PicFrame = sld.Shapes.AddPicture(@"D:\Aspose Data\Desert.jpg", Microsoft.Office.Core.MsoTriState.msoTriStateMixed, Microsoft.Office.Core.MsoTriState.msoTriStateMixed, 150, 100, 400, 300); //Applying animation on picture frame PicFrame.AnimationSettings.EntryEffect = Microsoft.Office.Interop.PowerPoint.PpEntryEffect.ppEffectBoxIn; //Saving Presentation pres.SaveAs("d:\\ VSTOAnim.ppt", PowerPoint.PpSaveAsFileType.ppSaveAsPresentation, Microsoft.Office.Core.MsoTriState.msoFalse); ``` ### **Aspose.Slides for .NET Example** Using Aspose.Slides for .NET, perform the following steps: 1. Create a presentation. 1. Access the first slide. 1. Add an image to a picture collection. 1. Add a picture shape to the slide. 1. Apply animation to the picture. 1. Write the presentation to disk. **The output presentation, created with Aspose.Slides** ![todo:image_alt_text](https://docs.aspose.com/slides/net/adding-picture-frame-with-animation/adding-picture-frame-with-animation_2.png) ```c# using Aspose.Slides; using Aspose.Slides.Animation; using Aspose.Slides.Export; // Create an empty presentation using (Presentation pres = new Presentation()) { // Access the first slide ISlide slide = pres.Slides[0]; // Add an image to the image collection of the presentation IImage image = Images.FromFile("aspose.jpg"); IPPImage ppImage = pres.Images.AddImage(image); image.Dispose(); // Add a picture frame whose height and width match the height and width of the image IPictureFrame pictureFrame = slide.Shapes.AddPictureFrame(ShapeType.Rectangle, 50, 150, ppImage.Width, ppImage.Height, ppImage); // Get the main animation sequence of the slide ISequence sequence = pres.Slides[0].Timeline.MainSequence; // Add the Fly from Left animation effect to the picture frame IEffect effect = sequence.AddEffect(pictureFrame, EffectType.Fly, EffectSubtype.Left, EffectTriggerType.OnClick); // Save the presentation pres.Save("AsposeAnim.ppt", SaveFormat.Ppt); } ``` ## Related articles - [Adding Picture Frame with Animation in VSTO and Aspose.Slides](https://docs.aspose.com/slides/net/adding-picture-frame-with-animation-in-vsto-and-aspose-slides/) - [Creating Tables Using VSTO and Aspose.Slides for .NET](https://docs.aspose.com/slides/net/creating-a-table-on-powerpoint-slide/) - [Format Text Using VSTO and Aspose.Slides for .NET](https://docs.aspose.com/slides/net/format-text-using-vsto-and-aspose-slides-and-net/) # Adding Shapes to Presentation > Source: https://docs.aspose.com/slides/net/adding-shapes-to-presentation/ Updated: 2026-08-05 ## **VSTO** Below is the code snippet for adding line shape: ``` csharp using Aspose.Slides; Slide slide = Application.ActivePresentation.Slides[1]; slide.Shapes.AddLine(10, 10, 100, 10); ``` ## **Aspose.Slides** To add a simple plain line to a selected slide of the presentation, please follow the steps below: - Create an instance of Presentation class - Obtain the reference of a slide by using its Index - Add an AutoShape of Line type using AddAutoShape method exposed by Shapes object - Write the modified presentation as a PPTX file In the example given below, we have added a line to the first slide of the presentation. ``` csharp using Aspose.Slides; //Instantiate Prseetation class that represents the PPTX Presentation pres = new Presentation(); //Get the first slide ISlide slide = pres.Slides[0]; //Add an autoshape of type line slide.Shapes.AddAutoShape(ShapeType.Line, 50, 150, 300, 0); ``` ## **Download Running Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/AsposeSlidesVsVSTOv1.1) ## **Download Sample Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/Aspose.Slides%20Vs%20VSTO%20Presentations/Code%20Comparison%20of%20Common%20Features/Adding%20Shape%20to%20Presentation) ## Related articles - [Add Picture Frame to Presentation](https://docs.aspose.com/slides/net/add-picture-frame-to-presentation/) - [Add Image in Table Cell](https://docs.aspose.com/slides/net/add-image-in-table-cell/) - [Change the fill color of a shape in a presentation](https://docs.aspose.com/slides/net/change-the-fill-color-of-a-shape-in-a-presentation/) # Adding Slide to Presentation > Source: https://docs.aspose.com/slides/net/adding-slide-to-presentation/ Updated: 2026-08-05 ## **OpenXML Presentation** In below functionality by default a slide is added to presentation.Here we are adding new slide at index 2 having some text in it. ``` csharp string FilePath = @"..\..\..\..\Sample Files\"; string FileName = FilePath + "Adding Slide to Presentation.pptx"; InsertNewSlide(FileName, 1, "My new slide"); // Insert a slide into the specified presentation. public static void InsertNewSlide(string presentationFile, int position, string slideTitle) { // Open the source document as read/write. using (PresentationDocument presentationDocument = PresentationDocument.Open(presentationFile, true)) { // Pass the source document and the position and title of the slide to be inserted to the next method. InsertNewSlide(presentationDocument, position, slideTitle); } } // Insert the specified slide into the presentation at the specified position. public static void InsertNewSlide(PresentationDocument presentationDocument, int position, string slideTitle) { if (presentationDocument == null) { throw new ArgumentNullException("presentationDocument"); } if (slideTitle == null) { throw new ArgumentNullException("slideTitle"); } PresentationPart presentationPart = presentationDocument.PresentationPart; // Verify that the presentation is not empty. if (presentationPart == null) { throw new InvalidOperationException("The presentation document is empty."); } // Declare and instantiate a new slide. Slide slide = new Slide(new CommonSlideData(new ShapeTree())); uint drawingObjectId = 1; // Construct the slide content. // Specify the non-visual properties of the new slide. NonVisualGroupShapeProperties nonVisualProperties = slide.CommonSlideData.ShapeTree.AppendChild(new NonVisualGroupShapeProperties()); nonVisualProperties.NonVisualDrawingProperties = new NonVisualDrawingProperties() { Id = 1, Name = "" }; nonVisualProperties.NonVisualGroupShapeDrawingProperties = new NonVisualGroupShapeDrawingProperties(); nonVisualProperties.ApplicationNonVisualDrawingProperties = new ApplicationNonVisualDrawingProperties(); // Specify the group shape properties of the new slide. slide.CommonSlideData.ShapeTree.AppendChild(new GroupShapeProperties()); // Declare and instantiate the title shape of the new slide. Shape titleShape = slide.CommonSlideData.ShapeTree.AppendChild(new Shape()); drawingObjectId++; // Specify the required shape properties for the title shape. titleShape.NonVisualShapeProperties = new NonVisualShapeProperties (new NonVisualDrawingProperties() { Id = drawingObjectId, Name = "Title" }, new NonVisualShapeDrawingProperties(new Drawing.ShapeLocks() { NoGrouping = true }), new ApplicationNonVisualDrawingProperties(new PlaceholderShape() { Type = PlaceholderValues.Title })); titleShape.ShapeProperties = new ShapeProperties(); // Specify the text of the title shape. titleShape.TextBody = new TextBody(new Drawing.BodyProperties(), new Drawing.ListStyle(), new Drawing.Paragraph(new Drawing.Run(new Drawing.Text() { Text = slideTitle }))); // Declare and instantiate the body shape of the new slide. Shape bodyShape = slide.CommonSlideData.ShapeTree.AppendChild(new Shape()); drawingObjectId++; // Specify the required shape properties for the body shape. bodyShape.NonVisualShapeProperties = new NonVisualShapeProperties(new NonVisualDrawingProperties() { Id = drawingObjectId, Name = "Content Placeholder" }, new NonVisualShapeDrawingProperties(new Drawing.ShapeLocks() { NoGrouping = true }), new ApplicationNonVisualDrawingProperties(new PlaceholderShape() { Index = 1 })); bodyShape.ShapeProperties = new ShapeProperties(); // Specify the text of the body shape. bodyShape.TextBody = new TextBody(new Drawing.BodyProperties(), new Drawing.ListStyle(), new Drawing.Paragraph()); // Create the slide part for the new slide. SlidePart slidePart = presentationPart.AddNewPart(); // Save the new slide part. slide.Save(slidePart); // Modify the slide ID list in the presentation part. // The slide ID list should not be null. SlideIdList slideIdList = presentationPart.Presentation.SlideIdList; // Find the highest slide ID in the current list. uint maxSlideId = 1; SlideId prevSlideId = null; foreach (SlideId slideId in slideIdList.ChildElements) { if (slideId.Id > maxSlideId) { maxSlideId = slideId.Id; } position--; if (position == 0) { prevSlideId = slideId; } } maxSlideId++; // Get the ID of the previous slide. SlidePart lastSlidePart; if (prevSlideId != null) { lastSlidePart = (SlidePart)presentationPart.GetPartById(prevSlideId.RelationshipId); } else { lastSlidePart = (SlidePart)presentationPart.GetPartById(((SlideId)(slideIdList.ChildElements[0])).RelationshipId); } // Use the same slide layout as that of the previous slide. if (null != lastSlidePart.SlideLayoutPart) { slidePart.AddPart(lastSlidePart.SlideLayoutPart); } // Insert the new slide into the slide list after the previous slide. SlideId newSlideId = slideIdList.InsertAfter(new SlideId(), prevSlideId); newSlideId.Id = maxSlideId; newSlideId.RelationshipId = presentationPart.GetIdOfPart(slidePart); // Save the modified presentation. presentationPart.Presentation.Save(); } } ``` ## **Aspose.Slides** Each PowerPoint presentation file contains one **Main Master slide** and other **Normal slides**. It means that a presentation file contains at least one or more slides. It is important to know that presentation files without slides are not supported by Aspose.Slides for .NET. Each slide has specific position and a **unique Id**. The **slide Id** can range from 0 to 255 for master slides and from 256 to 65535 for normal slides. Aspose.Slides for .NET allows developers to add empty slides to the presentations using the **AddEmptySlide** method exposed by **Presentation** object.To add an empty slide in the presentation, please follow the steps below: - Create an instance of Presentation class - Call the AddEmptySlide method exposed by Presentation object - Do some work with the newly added empty slide - Add another slide and insert text on it. - Finally, write the PPT file using the Write method exposed by Presentation object ``` csharp using Aspose.Slides; string FilePath = @"..\..\..\..\Sample Files\"; string FileName = FilePath + "Adding Slide to Presentation.pptx"; //Instantiate the Presentation class that represents the PPTX file Presentation pres = new Presentation(); //Blank slide is added by default, when you create //presentation from default constructor //Adding an empty slide to the presentation and getting the reference of //that empty slide ISlide slide = pres.Slides.AddEmptySlide(pres.LayoutSlides[0]); //Write the output to disk pres.Save(FileName,Aspose.Slides.Export.SaveFormat.Pptx); ``` ## **Download Sample Code** - [GitHub](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/AsposeSlidesVsOpenXML1.1) - [Sourceforge](https://sourceforge.net/projects/asposeopenxml/files/) ## Related articles - [Assemble Slides](https://docs.aspose.com/slides/net/assemble-slides/) - [Add Slides to Presentations in .NET](https://docs.aspose.com/slides/net/add-slide-to-presentation/) - [Add Layout Slides to Presentation](https://docs.aspose.com/slides/net/add-layout-slides-to-presentation/) # Adding Text Dynamically Using VSTO and Aspose.Slides for .NET > See how to migrate from Microsoft Office automation to Aspose.Slides for .NET and add dynamic text to PowerPoint (PPT, PPTX) presentations in C#. Source: https://docs.aspose.com/slides/net/adding-text-dynamically-using-vsto-and-aspose-slides-for-net/ Updated: 2026-08-13 A common task that developers are developers to accomplish is adding text to slides dynamically. This article shows code examples for adding text dynamically using [VSTO](https://docs.aspose.com/slides/net/adding-text-dynamically-using-vsto-and-aspose-slides-for-net/) and [Aspose.Slides for .NET](https://docs.aspose.com/slides/net/adding-text-dynamically-using-vsto-and-aspose-slides-for-net/). ## **Adding Text Dynamically** Both methods follow these steps: 1. Create a presentation. 1. Add a blank slide. 1. Add a text box. 1. Set some text. 1. Write the presentation. ## **VSTO Code Example** The code snippets below results in a presentation with a plain slide and a string of text on it. **The presentation as created in VSTO** ![todo:image_alt_text](https://docs.aspose.com/slides/net/adding-text-dynamically-using-vsto-and-aspose-slides-for-net/adding-text-dynamically-using-vsto-and-aspose-slides-for-net_1.png) ```c# //Note: PowerPoint is a namespace which has been defined above like this //using PowerPoint = Microsoft.Office.Interop.PowerPoint; //Create a presentation PowerPoint.Presentation pres = Globals.ThisAddIn.Application .Presentations.Add(Microsoft.Office.Core.MsoTriState.msoFalse); //Get the blank slide layout PowerPoint.CustomLayout layout = pres.SlideMaster. CustomLayouts[7]; //Add a blank slide PowerPoint.Slide sld = pres.Slides.AddSlide(1, layout); //Add a text PowerPoint.Shape shp = sld.Shapes.AddTextbox(Microsoft.Office.Core.MsoTextOrientation.msoTextOrientationHorizontal, 150, 100, 400, 100); //Set a text PowerPoint.TextRange txtRange = shp.TextFrame.TextRange; txtRange.Text = "Text added dynamically"; txtRange.Font.Name = "Arial"; txtRange.Font.Bold = Microsoft.Office.Core.MsoTriState.msoTrue; txtRange.Font.Size = 32; //Write the output to disk pres.SaveAs("c:\\outVSTO.ppt", PowerPoint.PpSaveAsFileType.ppSaveAsPresentation, Microsoft.Office.Core.MsoTriState.msoFalse); ``` ## **Aspose.Slides for .NET Example** The code snippets below use Aspose.Slides to create a presentation with a plain slide and a string of text on it. **The presentation as created using Aspose.Slides for .NET** ![todo:image_alt_text](https://docs.aspose.com/slides/net/adding-text-dynamically-using-vsto-and-aspose-slides-for-net/adding-text-dynamically-using-vsto-and-aspose-slides-for-net_2.png) ```c# using Aspose.Slides; using Aspose.Slides.Export; //Create a presentation Presentation pres = new Presentation(); //Blank slide is added by default, when you create //presentation from default constructor //So, we don't need to add any blank slide ISlide sld = pres.Slides[1]; //Add a textbox //To add it, we will first add a rectangle IShape shp = sld.Shapes.AddAutoShape(ShapeType.Rectangle, 1200, 800, 3200, 370); //Hide its line shp.LineFormat.Style = LineStyle.NotDefined; //Then add a textframe inside it ITextFrame tf = ((IAutoShape)shp).TextFrame; //Set a text tf.Text = "Text added dynamically"; IPortion port = tf.Paragraphs[0].Portions[0]; port.PortionFormat.FontBold = NullableBool.True; port.PortionFormat.FontHeight = 32; //Write the output to disk pres.Save("outAspose.ppt", SaveFormat.Ppt); ``` ## Related articles - [Creating Tables Using VSTO and Aspose.Slides for .NET](https://docs.aspose.com/slides/net/creating-a-table-on-powerpoint-slide/) - [Format Text Using VSTO and Aspose.Slides for .NET](https://docs.aspose.com/slides/net/format-text-using-vsto-and-aspose-slides-and-net/) - [Migration from Microsoft Office Automation to Aspose.Slides for .NET](https://docs.aspose.com/slides/net/migration-from-microsoft-office-automation-to-aspose/) # Adding Text Dynamically > Source: https://docs.aspose.com/slides/net/adding-text-dynamically/ Updated: 2026-08-05 Both methods follow these steps: - Create a presentation. - Add a blank slide. - Add a text box. - Set some text. - Write the presentation. ## **VSTO** ``` csharp private void AddTextBox() { //Create a presentation PowerPoint.Presentation pres = Globals.ThisAddIn.Application .Presentations.Add(Microsoft.Office.Core.MsoTriState.msoFalse); //Get the blank slide layout PowerPoint.CustomLayout layout = pres.SlideMaster. CustomLayouts[7]; //Add a blank slide PowerPoint.Slide sld = pres.Slides.AddSlide(1, layout); //Add a text PowerPoint.Shape shp =sld.Shapes.AddTextbox (Microsoft.Office.Core.MsoTextOrientation.msoTextOrientationHorizontal,150, 100, 400, 100); //Set a text PowerPoint.TextRange txtRange = shp.TextFrame.TextRange; txtRange.Text = "Text added dynamically"; txtRange.Font.Name = "Arial"; txtRange.Font.Bold = Microsoft.Office.Core.MsoTriState.msoTrue; txtRange.Font.Size = 32; //Write the output to disk pres.SaveAs("outVSTOAddingText.ppt", PowerPoint.PpSaveAsFileType.ppSaveAsPresentation, Microsoft.Office.Core.MsoTriState.msoFalse); } ``` ## **Aspose.Slides** ``` csharp using Aspose.Slides; using Aspose.Slides.Export; static void AddTextBox() { //Create a presentation //Blank slide is added by default, when you create //presentation from default constructor //So, we don't need to add any blank slide using (Presentation pres = new Presentation()) { ISlide sld = pres.Slides[0]; //Add a textbox //To add it, we will first add a rectangle IAutoShape shp = sld.Shapes.AddAutoShape(ShapeType.Rectangle, 150, 100, 400, 100); //Hide its line shp.LineFormat.FillFormat.FillType = FillType.NoFill; //Then add a textframe inside it ITextFrame tf = shp.AddTextFrame(""); //Set a text tf.Text = "Text added dynamically"; IPortion port = tf.Paragraphs[0].Portions[0]; port.PortionFormat.LatinFont = new FontData("Arial"); port.PortionFormat.FontBold = NullableBool.True; port.PortionFormat.FontHeight = 32; //Write the output to disk pres.Save("outAspose.pptx", SaveFormat.Pptx); } } ``` ## **Download Sample Code** - [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/download/AsposeSlidesVsVSTOv1.1/Adding.Text.Dynamically.Aspose.Slides.zip) - [Sourceforge](https://sourceforge.net/projects/asposevsto/files/Aspose.Slides%20Vs%20VSTO%20Slides/Adding%20Text%20Dynamically%20%28Aspose.Slides%29.zip/download) - [Bitbucket](https://bitbucket.org/asposemarketplace/aspose-for-vsto/src/master/Aspose.Slides%20Vs%20VSTO%20Slides/Adding%20Text%20Dynamically%20using%20VSTO%20and%20Aspose.Slides/) # AI Features in Aspose.Slides > Explore AI features in Aspose.Slides for .NET to generate, analyze, and enhance presentations in C#, with guides for PowerPoint and OpenDocument formats. Source: https://docs.aspose.com/slides/net/ai/ Updated: 2025-09-15 --- lastmod: 2025-09-15T09:30:49+06:00 title: AI Features in Aspose.Slides linktitle: AI type: docs weight: 40 url: /net/ai/ keywords: - AI features - AI presentation translator - AI presentation generator - AI slide translator - AI slide generator - multilingual presentation - multilingual slide - PowerPoint - OpenDocument - presentation - .NET - C# - Aspose.Slides description: "Explore AI features in Aspose.Slides for .NET to generate, analyze, and enhance presentations in C#, with guides for PowerPoint and OpenDocument formats." --- ## Related features - [Connect your own AI model provider](https://docs.aspose.com/slides/features/ai-model-provider/) - [Connect a self-hosted AI endpoint](https://docs.aspose.com/slides/features/ai-local-endpoint/) # AI-Powered Multilingual Slide Generator > Generate multilingual slides from text with Aspose.Slides for .NET. Apply your template and export polished decks to PowerPoint and OpenDocument. Learn more. Source: https://docs.aspose.com/slides/net/ai/generator/ Updated: 2026-08-05 ## **Introduction** Aspose.Slides introduces a new AI-powered feature, the Presentation Generator, which enables developers to automatically create well-structured PowerPoint presentations from simple text inputs such as topic descriptions, summaries, quotations, or bullet points. Users can adjust the level of content detail and optionally apply a custom presentation template to define the visual design. Currently, the AI Presentation Generator structures content using text blocks, bullet lists, and tables. Image generation is not yet supported; however, images can be easily added afterward using Aspose.Slides tools or manually. The output is a complete PowerPoint presentation that can be used as-is or exported to any format supported by the Aspose.Slides API. While the generator produces high-quality results, minor post-editing may be required to meet specific requirements. ## **How It Works** Aspose.Slides does not include built-in AI models; instead, it integrates with external AI services over the internet. This integration is handled by the [SlidesAIAgent](https://reference.aspose.com/slides/net/aspose.slides.ai/slidesaiagent/) class, which uses an implementation of the [IAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/iaiwebclient/) interface to communicate with the AI model. You can use the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/), which connects to OpenAI’s API, or provide a custom implementation of [IAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/iaiwebclient/) to work with another AI provider or language model. Aspose.Slides manages all communication with the AI service and processes the AI’s responses to generate slides. Note that the OpenAI API is a paid service, so an account and API key are required when using the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/). ## **Let's Code** ### **Example 1** This example demonstrates how to generate a presentation on the topic Aspose.Slides using the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/). ```csharp using Aspose.Slides; using Aspose.Slides.AI; using Aspose.Slides.Export; // Create an instance of OpenAIWebClient, the built-in implementation of the OpenAI web client. using var aiWebClient = new OpenAIWebClient("gpt-4o-mini", "apiKey", null); // Create an instance of SlidesAIAgent, which provides access to AI-powered features. var aiAgent = new SlidesAIAgent(aiWebClient); // Define the instruction for generating the presentation. var instruction = "Generate a presentation about Aspose.Slides for .NET, highlighting its capabilities and advantages over competitors."; // Generate a presentation with a medium amount of content based on the instruction. using IPresentation presentation = await aiAgent.GeneratePresentationAsync(instruction, PresentationContentAmountType.Medium); // Save the generated presentation to the local disk as a PowerPoint (.pptx) file. presentation.Save("Aspose.Slides.NET.pptx", SaveFormat.Pptx); ``` ### **Example 2** The following example demonstrates the overloads of the [GeneratePresentation](https://reference.aspose.com/slides/net/aspose.slides.ai/slidesaiagent/generatepresentation/) method. In this case, an externally managed [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) instance and the user’s `master presentation` are used. By default, the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/) creates and manages its own internal [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) instance, handling its lifecycle and disposal automatically. However, if you prefer to manage the [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) yourself—for example, when using an [IHttpClientFactory](https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-factory) for improved resource management and performance—you can supply your own [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) instance when constructing the [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/). ```csharp using System.Net.Http; using Aspose.Slides; using Aspose.Slides.AI; using Aspose.Slides.Export; // Create an externally managed HttpClient instance. using var httpClient = new HttpClient(); // Pass the HttpClient to the OpenAIWebClient constructor. using var aiWebClient = new OpenAIWebClient("gpt-4o-mini", "apiKey", "organizationId", httpClient); // Create an instance of SlidesAIAgent. var aiAgent = new SlidesAIAgent(aiWebClient); // Define the instruction for generating the presentation. var instruction = "Generate a presentation about Aspose.Slides for .NET, highlighting its capabilities and advantages over competitors."; // Load a master presentation from the local disk to use as the design template. using var masterPresentation = new Presentation("masterPresentation.pptx"); // Generate a detailed presentation using the instruction and master template. using IPresentation presentation = await aiAgent.GeneratePresentationAsync(instruction, PresentationContentAmountType.Detailed, masterPresentation); // Save the generated presentation as a PDF. presentation.Save("Aspose.Slides.NET.pdf", SaveFormat.Pdf); ``` It is worth noting that many customers use Aspose.Slides in synchronous contexts. To support this, the [SlidesAIAgent](https://reference.aspose.com/slides/net/aspose.slides.ai/slidesaiagent/) class provides both synchronous and asynchronous methods, allowing you to choose the approach that best fits your application’s workflow. ## **Key Benefits** The new AI Presentation Generator in Aspose.Slides provides a fast and flexible way to produce structured slide decks from simple text prompts. With support for custom templates, externally managed [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) instances, and both synchronous and asynchronous workflows, it can be seamlessly integrated into a wide range of applications. Typical use cases include creating marketing presentations, educational materials, client reports, and internal slide decks. Although image generation is not yet supported, the tool already offers a strong foundation for automating presentation creation, with further enhancements expected in the future. ## Related features - [Generate a presentation from a prompt](https://docs.aspose.com/slides/features/ai-generate-presentations/) - [Generate presentations from a template](https://docs.aspose.com/slides/features/ai-template-generation/) - [Generate slides using an existing deck's style](https://docs.aspose.com/slides/features/ai-match-style/) ## Related articles - [AI-Powered Presentation Translator](https://docs.aspose.com/slides/net/ai/translator/) # AI-Powered Presentation Translator > Translate PowerPoint slides with AI using Aspose.Slides for .NET. Localize PPT, PPTX and ODP while preserving layout—fast and developer-friendly. Try it. Source: https://docs.aspose.com/slides/net/ai/translator/ Updated: 2026-09-15 ## **Introduction** Aspose.Slides is a powerful API for programmatically managing PowerPoint presentations. In addition to creating, editing, and converting slides, it offers AI-driven features - such as the [Presentation Translation API](https://reference.aspose.com/slides/net/aspose.slides.ai/) for multilingual slide content. ## **How It Works** Aspose.Slides does not include built-in AI capabilities but integrates with external AI models over the internet. This functionality is exposed via the [SlidesAIAgent](https://reference.aspose.com/slides/net/aspose.slides.ai/slidesaiagent) class, which uses an implementation of the [IAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/iaiwebclient/) interface to communicate with AI services. You can use the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/) to connect to OpenAI’s API or implement your own [IAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/iaiwebclient/) to use a different AI provider or language model. Aspose.Slides handles the communication, parses the AI responses, and intelligently inserts translated content while preserving the original slide layout and formatting. Note that the OpenAI API is a paid service, so you will need to create an account and supply your API key when using the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/). ## **Example** In this example, we translate a PowerPoint presentation into Japanese using the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/) with a specified OpenAI [model](https://platform.openai.com/docs/models). ```csharp using Aspose.Slides; using Aspose.Slides.AI; using Aspose.Slides.Export; // Load a presentation to translate. using var presentation = new Presentation("sample.pptx"); // Create an AI client with OpenAIWebClient, specifying your model and API key. using var aiWebClient = new OpenAIWebClient(model: "gpt-4o-mini", apiKey: "apiKey", organizationId: null); // Initialize SlidesAIAgent with the AI client. var aiAgent = new SlidesAIAgent(aiWebClient); // Translate the presentation to Japanese. await aiAgent.TranslateAsync(presentation, "japanese"); // Save the translated presentation as a PDF. presentation.Save("sample_jp.pdf", SaveFormat.Pdf); ``` By default, the built-in [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/) creates and manages its own internal [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) instance, handling its lifecycle and disposal automatically. However, if you prefer to manage the [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) yourself - such as when using an [IHttpClientFactory](https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-factory) for better resource management and performance - you can provide your own `HttpClient` instance when constructing the [OpenAIWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaiwebclient/). ```csharp using System.Net.Http; using Aspose.Slides.AI; // Use an HttpClient you manage yourself - for example, one created by an IHttpClientFactory // injected via dependency injection. HttpClient httpClient = new HttpClient(); using var aiWebClient = new OpenAIWebClient("gpt-4o-mini", "apiKey", null, httpClient); ``` Aspose.Slides is commonly used in synchronous environments. To support this, the [SlidesAIAgent](https://reference.aspose.com/slides/net/aspose.slides.ai/slidesaiagent/) class offers both synchronous and asynchronous methods - allowing you to choose the approach that best fits your application’s workflow. ### **Azure OpenAI Example** Aspose.Slides for .NET supports OpenAI-compatible providers, including Azure OpenAI. You can configure the translator to use your in-house Azure deployment with the [OpenAICompatibleWebClient](https://reference.aspose.com/slides/net/aspose.slides.ai/openaicompatiblewebclient/). ```csharp using Aspose.Slides; using Aspose.Slides.AI; using Aspose.Slides.Export; var model = "your-azure-deployment-name"; var apiKey = "your-azure-api-key"; var baseUrl = "https://your-resource.openai.azure.com/openai/v1/"; using var aiWebClient = new OpenAICompatibleWebClient(model, apiKey, baseUrl); var aiAgent = new SlidesAIAgent(aiWebClient); using var presentation = new Presentation("Presentation.pptx"); aiAgent.Translate(presentation, "spanish"); presentation.Save("Translated.pptx", SaveFormat.Pptx); ``` This snippet demonstrates translating a presentation using your Azure OpenAI endpoint. Replace the placeholder values with your deployment name, API key, and endpoint URL. ## **Key Benefits** The Aspose.Slides [Presentation Translation API](https://reference.aspose.com/slides/net/aspose.slides.ai/) offers an AI-powered solution for delivering multilingual PowerPoint presentations. By automating translation while preserving layout and design, it saves time and minimizes errors compared to manual workflows. Whether you're a developer, educator, or business professional, this API enables you to create engaging, localized presentations for global audiences - expanding your reach and improving communication. ## Related features - [Translate slide text with AI](https://docs.aspose.com/slides/features/ai-translate-text/) ## Related articles - [AI-Powered Multilingual Slide Generator](https://docs.aspose.com/slides/net/ai/generator/) # Animate PowerPoint Charts in .NET > Create stunning animated charts in .NET with Aspose.Slides. Boost presentations with dynamic visuals in PPT and PPTX files—get started now. Source: https://docs.aspose.com/slides/net/animated-charts/ Updated: 2026-11-08 ## **Introduction** Aspose.Slides for .NET supports animating the chart elements. **Series**, **Categories**, **Series Elements**, **Categories Elements** can be animated with [ISequence.AddEffect](https://reference.aspose.com/slides/net/aspose.slides.animation/isequence/methods/addeffect) method and two enums [EffectChartMajorGroupingType](https://reference.aspose.com/slides/net/aspose.slides.animation/effectchartmajorgroupingtype) and [EffectChartMinorGroupingType](https://reference.aspose.com/slides/net/aspose.slides.animation/effectchartminorgroupingtype). ## **Chart Series Animation** If you want to animate a chart series, write the code according to the steps listed below: 1. Load a presentation. 1. Get reference of the chart object. 1. Animate the series. 1. Write the presentation file to disk. In the example given below, we animated chart series. ```c# using Aspose.Slides; using Aspose.Slides.Animation; using Aspose.Slides.Charts; using Aspose.Slides.Export; // Instantiate Presentation class that represents a presentation file using (Presentation presentation = new Presentation("ExistingChart.pptx")) { // Get reference of the chart object var slide = presentation.Slides[0] as Slide; var shapes = slide.Shapes as ShapeCollection; var chart = shapes[0] as IChart; // Animate the series slide.Timeline.MainSequence.AddEffect(chart, EffectType.Fade, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.BySeries, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.BySeries, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.BySeries, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.BySeries, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); // Write the modified presentation to disk presentation.Save("AnimatingSeries_out.pptx", SaveFormat.Pptx); } ``` ## **Chart Category Animation** If you want to animate a chart category, write the code according to the steps listed below: 1. Load a presentation. 1. Get reference of the chart object. 1. Animate the Category. 1. Write the presentation file to disk. In the example given below, we animated chart category. ```c# using Aspose.Slides; using Aspose.Slides.Animation; using Aspose.Slides.Charts; using Aspose.Slides.Export; using (Presentation presentation = new Presentation("ExistingChart.pptx")) { // Get reference of the chart object var slide = presentation.Slides[0] as Slide; var shapes = slide.Shapes as ShapeCollection; var chart = shapes[0] as IChart; // Animate the categories slide.Timeline.MainSequence.AddEffect(chart, EffectType.Fade, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.ByCategory, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.ByCategory, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.ByCategory, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMajorGroupingType.ByCategory, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); // Write the presentation file to disk presentation.Save("AnimatingCategories_out.pptx", SaveFormat.Pptx); } ``` [![The chart fade precedes four category effects at indices 0–3, each AfterPrevious.](https://docs.aspose.com/slides/net/animated-charts/visual-chart-animation-grouping-8de3c15d52e6.svg)](https://docs.aspose.com/slides/net/animated-charts/visual-chart-animation-grouping-8de3c15d52e6.svg) *The sample adds a chart fade followed by ByCategory effects at indices 0–3. All use AfterPrevious. This is a configuration diagram, not a playback capture.* ## **Animation in a Series Element** If you want to animate series elements, write the code according to the steps listed below: 1. Load a presentation. 1. Get reference of the chart object. 1. Animate series elements. 1. Write the presentation file to disk. In the example given below, we have animated series' elements. ```c# using Aspose.Slides; using Aspose.Slides.Animation; using Aspose.Slides.Charts; using Aspose.Slides.Export; // Load a presentation using (Presentation presentation = new Presentation("ExistingChart.pptx")) { // Get reference of the chart object var slide = presentation.Slides[0] as Slide; var shapes = slide.Shapes as ShapeCollection; var chart = shapes[0] as IChart; // Animate series elements slide.Timeline.MainSequence.AddEffect(chart, EffectType.Fade, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 0, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 0, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 0, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 0, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 1, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 1, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 1, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 1, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 2, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 2, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 2, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInSeries, 2, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); // Write the presentation file to disk presentation.Save("AnimatingSeriesElements_out.pptx", SaveFormat.Pptx); } ``` ## **Animation in a Category Element** If you want to animate categories elements, write the code according to the steps listed below: 1. Load a presentation. 1. Get reference of the chart object. 1. Animate categories elements. 1. Write the presentation file to disk. In the example given below, we have animated categories elements. ```c# using Aspose.Slides; using Aspose.Slides.Animation; using Aspose.Slides.Charts; using Aspose.Slides.Export; using (Presentation presentation = new Presentation("ExistingChart.pptx")) { // Get reference of the chart object var slide = presentation.Slides[0] as Slide; var shapes = slide.Shapes as ShapeCollection; var chart = shapes[0] as IChart; // Animate categories' elements slide.Timeline.MainSequence.AddEffect(chart, EffectType.Fade, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 0, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 0, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 0, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 0, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 1, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 1, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 1, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 1, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 2, 0, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 2, 1, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 2, 2, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); ((Sequence)slide.Timeline.MainSequence).AddEffect(chart, EffectChartMinorGroupingType.ByElementInCategory, 2, 3, EffectType.Appear, EffectSubtype.None, EffectTriggerType.AfterPrevious); // Write the presentation file to disk presentation.Save("AnimatingCategoriesElements_out.pptx", SaveFormat.Pptx); } ``` ## **FAQ** ### Are different effect types (e.g., entrance, emphasis, exit) supported for charts like for regular shapes? Yes. A chart is treated as a shape, so it supports the standard animation effect types, including entrance, emphasis, and exit, with full control via the slide's timeline and animation sequences. ### Can I combine chart animation with slide transitions? Yes. [Transitions](https://docs.aspose.com/slides/net/slide-transition/) apply to the slide, while animation effects apply to objects on the slide. You can use both together in the same presentation and control them independently. ### Are chart animations preserved when saving to PPTX? Yes. When you [save to PPTX](https://docs.aspose.com/slides/net/save-presentation/), all animation effects and their ordering are preserved because they are part of the presentation's native animation model. ### Can I read existing chart animations from a presentation and modify them? Yes. The [API](https://reference.aspose.com/slides/net/aspose.slides.animation/) provides access to the slide timeline, sequences, and effects, allowing you to inspect existing chart animations and adjust them without recreating everything from scratch. ### Can I produce a video that includes chart animations using Aspose.Slides? Yes. You can [export a presentation to video](https://docs.aspose.com/slides/net/convert-powerpoint-to-video/) while preserving animations, configuring timings and other export settings so the resulting clip reflects the animated playback. ## Related features - [Animate charts](https://docs.aspose.com/slides/features/chart-animation/) ## Related articles - [Animate PowerPoint Text in .NET](https://docs.aspose.com/slides/net/animated-text/) - [Enhance PowerPoint Presentations with Animations in .NET](https://docs.aspose.com/slides/net/powerpoint-animation/) # Animate PowerPoint Text in .NET > Create dynamic animated text in PowerPoint and OpenDocument presentations using Aspose.Slides for .NET, with easy-to-follow, optimized C# code examples. Source: https://docs.aspose.com/slides/net/animated-text/ Updated: 2026-08-05 ## **Overview** This article explains how to work with animated text in Aspose.Slides by applying animation effects to individual paragraphs and retrieving the effects already assigned to paragraphs in a text frame. It focuses on the API methods used to add paragraph-level animation and inspect existing paragraph animation effects in a presentation. ## **Add Animation Effects to Paragraphs** We added the [**AddEffect()**](https://reference.aspose.com/slides/net/aspose.slides.animation/sequence/methods/addeffect/index) method to the [**Sequence**](https://reference.aspose.com/slides/net/aspose.slides.animation/sequence) and [**ISequence**](https://reference.aspose.com/slides/net/aspose.slides.animation/isequence) classes. This method allows you to add animation effects to a single paragraph. This sample code shows you how to add an animation effect to a single paragraph: ```c# using Aspose.Slides; using Aspose.Slides.Animation; using Aspose.Slides.Export; using (Presentation presentation = new Presentation("Presentation1.pptx")) { // select paragraph to add effect IAutoShape autoShape = (IAutoShape)presentation.Slides[0].Shapes[0]; IParagraph paragraph = autoShape.TextFrame.Paragraphs[0]; // add Fly animation effect to selected paragraph IEffect effect = presentation.Slides[0].Timeline.MainSequence.AddEffect(paragraph, EffectType.Fly, EffectSubtype.Left, EffectTriggerType.OnClick); presentation.Save("AnimationEffectinParagraph.pptx", SaveFormat.Pptx); } ``` ## **Get Animation Effects for Paragraphs** You may decide to find out the animation effects added to a paragraph—for example, in one scenario, you want to get the animation effects in a paragraph because you plan to apply those effects to another paragraph or shape. Aspose.Slides for .NET allows you to get all the animation effects applied to paragraphs contained in a text frame (shape). This sample code shows you how to get the animation effects in a paragraph: ```c# using Aspose.Slides; using Aspose.Slides.Animation; using (Presentation pres = new Presentation("Test.pptx")) { ISequence sequence = pres.Slides[0].Timeline.MainSequence; IAutoShape autoShape = (IAutoShape)pres.Slides[0].Shapes[1]; foreach (IParagraph paragraph in autoShape.TextFrame.Paragraphs) { IEffect[] effects = sequence.GetEffectsByParagraph(paragraph); if (effects.Length > 0) Console.WriteLine("Paragraph \"" + paragraph.Text + "\" has " + effects[0].Type + " effect."); } } ``` ## **FAQ** ### How do text animations differ from slide transitions, and can they be combined? Text animations control object behavior over time on a slide, while [transitions](https://docs.aspose.com/slides/net/slide-transition/) control how slides change. They’re independent and can be used together; playback order is governed by the animation timeline and the transition settings. ### Are text animations preserved when exporting to PDF or images? No. PDF and raster images are static, so you’ll see a single state of the slide without motion. To keep movement, use [video](https://docs.aspose.com/slides/net/convert-powerpoint-to-video/) or [HTML](https://docs.aspose.com/slides/net/export-to-html5/) export. ### Do text animations work in layouts and the slide master? Effects applied to layout/master objects are inherited by slides, but their timing and interaction with slide-level animations depend on the final sequence on the slide. ## Related articles - [Animation](https://docs.aspose.com/slides/net/examples/elements/animation/) - [Animate PowerPoint Charts in .NET](https://docs.aspose.com/slides/net/animated-charts/) - [Enhance PowerPoint Presentations with Animations in .NET](https://docs.aspose.com/slides/net/powerpoint-animation/) # Output Metadata Limitations > Aspose.Slides for .NET writes fixed application, creator, and producer metadata to saved PPTX, PDF, and ODP files, whatever application name you set. Source: https://docs.aspose.com/slides/net/api-limitations/ Updated: 2026-09-28 ## **Overview** When presentations are created or exported with Aspose.Slides, certain technical metadata is written to the output file. This article explains the limitations related to the `Application`, `Creator`, `Producer`, and generator metadata fields in PPTX, PDF, and ODP files. ## **Application and Producer** When you create or export presentations with Aspose.Slides for .NET, some technical metadata is written into the file. Two fields often raise questions: **Application** identifies the program that created or last saved a **PPTX** presentation. In Aspose.Slides for .NET, this value is fixed and shows the library name rather than your app name, even if you set [DocumentProperties.NameOfApplication](https://reference.aspose.com/slides/net/aspose.slides/documentproperties/nameofapplication/). **Producer** identifies the rendering engine that generated the final file during export. In **PDF** exports, metadata uses **Creator** and **Producer** fields. With Aspose.Slides for .NET, both of these are fixed and reflect the library and its version. **What’s restricted** You cannot override these fields through the API for the formats above. For **PPTX**, the Application property is written as "Aspose.Slides for .NET". For **PDF**, the Creator and Producer properties are written as "Aspose.Slides for .NET" followed by the library version. For **ODP**, the generator field is written as "Aspose.Slides for .NET" followed by the library version. This behavior is by design and applies regardless of how you load or save the file, and regardless of values assigned to [DocumentProperties.NameOfApplication](https://reference.aspose.com/slides/net/aspose.slides/documentproperties/nameofapplication/). This restriction does not apply to **PPT** files: in a PPT file, the application name that you set in [DocumentProperties.NameOfApplication](https://reference.aspose.com/slides/net/aspose.slides/documentproperties/nameofapplication/) is saved. # API Reference > Create, edit, and convert presentations in .NET—no PowerPoint needed. Aspose.Slides supports PPT, PPTX, and ODP with fast SVG/PDF export. Source: https://docs.aspose.com/slides/net/api-reference/ Updated: 2026-08-13 Aspose.Slides for .NET is a class library that enables .NET applications to read and write presentation documents without using Microsoft PowerPoint® or others. Aspose.Slides for .NET allows to manage text, shapes, tables & animations, add audio and video to slides, preview slides, export slides to SVG, PDF format and more. Latest API Reference can be found at [Aspose.Slides for .NET API Reference](https://reference.aspose.com/slides/net). ## Related articles - [Aspose.Slides for .NET](https://docs.aspose.com/slides/net/) # Apply a theme to a presentation > Source: https://docs.aspose.com/slides/net/apply-a-theme-to-a-presentation/ Updated: 2026-08-05 ## **OpenXML Presentation** ``` csharp string FilePath = @"..\..\..\..\Sample Files\"; string FileName = FilePath + "Apply Theme to Presentation.pptx"; string ThemeFileName = FilePath + "Theme.pptx"; ApplyThemeToPresentation(FileName, ThemeFileName); // Apply a new theme to the presentation. public static void ApplyThemeToPresentation(string presentationFile, string themePresentation) { using (PresentationDocument themeDocument = PresentationDocument.Open(themePresentation, false)) using (PresentationDocument presentationDocument = PresentationDocument.Open(presentationFile, true)) { ApplyThemeToPresentation(presentationDocument, themeDocument); } } // Apply a new theme to the presentation. public static void ApplyThemeToPresentation(PresentationDocument presentationDocument, PresentationDocument themeDocument) { if (presentationDocument == null) { throw new ArgumentNullException("presentationDocument"); } if (themeDocument == null) { throw new ArgumentNullException("themeDocument"); } // Get the presentation part of the presentation document. PresentationPart presentationPart = presentationDocument.PresentationPart; // Get the existing slide master part. SlideMasterPart slideMasterPart = presentationPart.SlideMasterParts.ElementAt(0); string relationshipId = presentationPart.GetIdOfPart(slideMasterPart); // Get the new slide master part. SlideMasterPart newSlideMasterPart = themeDocument.PresentationPart.SlideMasterParts.ElementAt(0); // Remove the existing theme part. presentationPart.DeletePart(presentationPart.ThemePart); // Remove the old slide master part. presentationPart.DeletePart(slideMasterPart); // Import the new slide master part, and reuse the old relationship ID. newSlideMasterPart = presentationPart.AddPart(newSlideMasterPart, relationshipId); // Change to the new theme part. presentationPart.AddPart(newSlideMasterPart.ThemePart); Dictionary newSlideLayouts = new Dictionary(); foreach (var slideLayoutPart in newSlideMasterPart.SlideLayoutParts) { newSlideLayouts.Add(GetSlideLayoutType(slideLayoutPart), slideLayoutPart); } string layoutType = null; SlideLayoutPart newLayoutPart = null; // Insert the code for the layout for this example. string defaultLayoutType = "Title and Content"; // Remove the slide layout relationship on all slides. foreach (var slidePart in presentationPart.SlideParts) { layoutType = null; if (slidePart.SlideLayoutPart != null) { // Determine the slide layout type for each slide. layoutType = GetSlideLayoutType(slidePart.SlideLayoutPart); // Delete the old layout part. slidePart.DeletePart(slidePart.SlideLayoutPart); } if (layoutType != null && newSlideLayouts.TryGetValue(layoutType, out newLayoutPart)) { // Apply the new layout part. slidePart.AddPart(newLayoutPart); } else { newLayoutPart = newSlideLayouts[defaultLayoutType]; // Apply the new default layout part. slidePart.AddPart(newLayoutPart); } } } // Get the slide layout type. public static string GetSlideLayoutType(SlideLayoutPart slideLayoutPart) { CommonSlideData slideData = slideLayoutPart.SlideLayout.CommonSlideData; // Remarks: If this is used in production code, check for a null reference. return slideData.Name; } ``` ## **Aspose.Slides** In order to apply theme we need to clone the slide with master, please follow the steps below: - Create an instance of the Presentation class containing the source presentation the slide will be cloned from. - Create an instance of the Presentation class containing the destination presentation the slide will be cloned to. - Access the slide to be cloned along with the master slide. - Instantiate the IMasterSlideCollection class by referencing the Masters collection exposed by the Presentation object of the destination presentation. - Call the AddClone method exposed by the IMasterSlideCollection object and pass the master from the source PPTX to be cloned as parameter to the AddClone method. - Instantiate the ISlideCollection class by setting the reference to the Slides collection exposed by the Presentation object of the destination presentation. - Call the AddClone method exposed by the ISlideCollection object and pass the slide from the source presentation to be cloned and master slide as parameter to the AddClone method. - Write the modified destination presentation file. ``` csharp using Aspose.Slides; using Aspose.Slides.Export; string FilePath = @"..\..\..\..\Sample Files\"; string FileName = FilePath + "Apply Theme to Presentation.pptx"; string ThemeFileName = FilePath + "Theme.pptx"; ApplyThemeToPresentation(ThemeFileName, FileName); static void ApplyThemeToPresentation(string presentationFile, string outputFile) { //Instantiate Presentation class to load the source presentation file using Presentation srcPres = new Presentation(presentationFile); //Instantiate Presentation class for destination presentation (where slide is to be cloned) using Presentation destPres = new Presentation(outputFile); //Instantiate ISlide from the collection of slides in source presentation along with //master slide ISlide SourceSlide = srcPres.Slides[0]; IMasterSlide SourceMaster = SourceSlide.LayoutSlide.MasterSlide; //Clone the desired master slide from the source presentation to the collection of masters in the //destination presentation IMasterSlideCollection masters = destPres.Masters; IMasterSlide iSlide = masters.AddClone(SourceMaster); //Clone the desired slide from the source presentation with the desired master to the end of the //collection of slides in the destination presentation ISlideCollection slds = destPres.Slides; slds.AddClone(SourceSlide, iSlide, true); //Save the destination presentation to disk destPres.Save(outputFile, SaveFormat.Pptx); } ``` ## **Download Running Code Example** - [GitHub](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/AsposeSlidesVsOpenXML1.1) ## **Sample Code** - [GitHub](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/OpenXML/Common%20Features/Apply%20Theme%20to%20Presentation) ## Related articles - [Clone Presentation Slides in .NET](https://docs.aspose.com/slides/net/clone-slides/) # Restrict Presentation Edits with Shape Locks in .NET > Learn how to lock and unlock shapes in PPTX presentations with Aspose.Slides for .NET to restrict selection, movement, resizing, and grouping. Source: https://docs.aspose.com/slides/net/applying-protection-to-presentation/ Updated: 2026-10-20 ## **Background** A common use for Aspose.Slides for .NET is to create, update, and save PowerPoint (PPTX) presentations as part of an automated workflow. When users receive these presentations, restricting changes to shapes can help preserve the intended layout and content. This article explains how shapes are organized on slides and how to apply and remove shape locks in a PPTX presentation. These locks let you restrict specific editing operations on individual shapes. ## **Composition of a Slide** A presentation slide is composed of components such as autoshapes, tables, OLE objects, grouped shapes, picture frames, video frames, connectors, and other elements used to build a presentation. In Aspose.Slides for .NET, each element on a slide is represented by an object that implements the [IShape](https://reference.aspose.com/slides/net/aspose.slides/ishape/) interface or inherits from a class that does. Different shape types expose different locking options. The [IBaseShapeLock](https://reference.aspose.com/slides/net/aspose.slides/ibaseshapelock/) interface is the base interface for shape locks. Aspose.Slides for .NET provides the following lock interfaces: - [IAutoShapeLock](https://reference.aspose.com/slides/net/aspose.slides/iautoshapelock/) locks autoshapes. - [IConnectorLock](https://reference.aspose.com/slides/net/aspose.slides/iconnectorlock/) locks connector shapes. - [IGraphicalObjectLock](https://reference.aspose.com/slides/net/aspose.slides/igraphicalobjectlock/) locks graphical objects. - [IGroupShapeLock](https://reference.aspose.com/slides/net/aspose.slides/igroupshapelock/) locks group shapes. - [IPictureFrameLock](https://reference.aspose.com/slides/net/aspose.slides/ipictureframelock/) locks picture frames. To apply locks across a [Presentation](https://reference.aspose.com/slides/net/aspose.slides/presentation/), iterate through its slides and set the appropriate locks on each supported shape. ## **Apply and Remove Protection** Shape locks restrict operations such as selecting, moving, and resizing shapes. They do not make the entire presentation uneditable. ### **Apply Protection to PPTX Shapes** Aspose.Slides for .NET provides the [IShape](https://reference.aspose.com/slides/net/aspose.slides/ishape/) interface to work with shapes on a slide. The example sets [SelectLocked](https://reference.aspose.com/slides/net/aspose.slides/iautoshapelock/selectlocked/), [PositionLocked](https://reference.aspose.com/slides/net/aspose.slides/iautoshapelock/positionlocked/), and [SizeLocked](https://reference.aspose.com/slides/net/aspose.slides/iautoshapelock/sizelocked/) to `true` for autoshapes, with equivalent locks for group shapes, connectors, and picture frames. Connectors use [PositionMove](https://reference.aspose.com/slides/net/aspose.slides/iconnectorlock/positionmove/) for movement; groups also use [GroupingLocked](https://reference.aspose.com/slides/net/aspose.slides/igroupshapelock/groupinglocked/) to restrict grouping. The example loads an existing PPTX presentation, checks the shapes in each slide's shape collection, and saves a copy with these restrictions applied. Shapes outside the four handled types are left unchanged. The loop does not traverse the child shapes inside a group. ```cs using Aspose.Slides; using Aspose.Slides.Export; using var presentation = new Presentation("Sample.pptx"); foreach (var slide in presentation.Slides) { foreach (var shape in slide.Shapes) { if (shape is IAutoShape autoShape) { autoShape.ShapeLock.PositionLocked = true; autoShape.ShapeLock.SelectLocked = true; autoShape.ShapeLock.SizeLocked = true; } else if (shape is IGroupShape groupShape) { groupShape.ShapeLock.GroupingLocked = true; groupShape.ShapeLock.PositionLocked = true; groupShape.ShapeLock.SelectLocked = true; groupShape.ShapeLock.SizeLocked = true; } else if (shape is IConnector connectorShape) { connectorShape.ShapeLock.PositionMove = true; connectorShape.ShapeLock.SelectLocked = true; connectorShape.ShapeLock.SizeLocked = true; } else if (shape is IPictureFrame pictureFrame) { pictureFrame.ShapeLock.PositionLocked = true; pictureFrame.ShapeLock.SelectLocked = true; pictureFrame.ShapeLock.SizeLocked = true; } } } presentation.Save("ProtectedSample.pptx", SaveFormat.Pptx); ``` ### **Remove Protection** To remove a shape lock, set its value to `false`. The following example loads a presentation with shape locks and clears the selection, movement, and resizing restrictions through [IAutoShapeLock](https://reference.aspose.com/slides/net/aspose.slides/iautoshapelock/), [IGroupShapeLock](https://reference.aspose.com/slides/net/aspose.slides/igroupshapelock/), [IConnectorLock](https://reference.aspose.com/slides/net/aspose.slides/iconnectorlock/), and [IPictureFrameLock](https://reference.aspose.com/slides/net/aspose.slides/ipictureframelock/). It also clears [IGroupShapeLock.GroupingLocked](https://reference.aspose.com/slides/net/aspose.slides/igroupshapelock/groupinglocked/) and saves a copy of the presentation. Other lock settings are left unchanged. ```cs using Aspose.Slides; using Aspose.Slides.Export; using var presentation = new Presentation("ProtectedSample.pptx"); foreach (var slide in presentation.Slides) { foreach (var shape in slide.Shapes) { if (shape is IAutoShape autoShape) { autoShape.ShapeLock.PositionLocked = false; autoShape.ShapeLock.SelectLocked = false; autoShape.ShapeLock.SizeLocked = false; } else if (shape is IGroupShape groupShape) { groupShape.ShapeLock.GroupingLocked = false; groupShape.ShapeLock.PositionLocked = false; groupShape.ShapeLock.SelectLocked = false; groupShape.ShapeLock.SizeLocked = false; } else if (shape is IConnector connectorShape) { connectorShape.ShapeLock.PositionMove = false; connectorShape.ShapeLock.SelectLocked = false; connectorShape.ShapeLock.SizeLocked = false; } else if (shape is IPictureFrame pictureFrame) { pictureFrame.ShapeLock.PositionLocked = false; pictureFrame.ShapeLock.SelectLocked = false; pictureFrame.ShapeLock.SizeLocked = false; } } } presentation.Save("RemovedProtectionSample.pptx", SaveFormat.Pptx); ``` ### **Conclusion** Aspose.Slides for .NET lets you restrict specific editing operations on individual shapes or apply the same restrictions across slides. Choose the locks supported by each shape type, and set their values to `false` when you need to remove those restrictions. ## **FAQ** **Can I combine shape locks and password protection in the same presentation?** Yes. Shape locks restrict specific editing operations, while [password protection](https://docs.aspose.com/slides/net/password-protected-presentation/) can restrict opening or modifying the presentation. You can use both in the same file. **Can I restrict editing on specific slides without affecting others?** Yes. Apply locks only to shapes on the selected slides. This does not change the lock settings on other slides. **How can I apply locks to individual shapes inside a group?** Iterate through the group's [Shapes](https://reference.aspose.com/slides/net/aspose.slides/igroupshape/shapes/) collection and apply the appropriate locks to each child shape. Repeat this for any nested groups. The examples above process only the slide's shape collection, so they do not set locks on individual group members. ## Related features - [Lock shapes against editing](https://docs.aspose.com/slides/features/shape-locks/) ## Related articles - [Presentation Locking](https://docs.aspose.com/slides/net/presentation-locking/) # Aspose.Slides for OpenXML > Source: https://docs.aspose.com/slides/net/aspose-slides-for-openxml/ Updated: 2026-08-31 ## **What Is OpenXML?** OpenXML SDK is a .NET SDK from Microsoft in order to process Microsoft Office 2007 and above file formats. These file formats are basically zipped packages and the Open XML SDK for Office simplifies the task of manipulating Open XML packages and the underlying Open XML schema elements within a package. The classes in the Open XML SDK encapsulate many common tasks that developers perform on Open XML packages, so that you can perform complex operations with lines of code. Once you have installed the Open XML SDK 2.5, open your existing project or application in Visual Studio, or create a new project or application. Then, in your project or application, add references to the following components: - DocumentFormat.OpenXml - WindowsBase ## **Aspose.Slides for .NET** Aspose.Slides for .NET is a unique PowerPoint® management component that enables .NET applications to read, write and manipulate PowerPoint documents without using Microsoft PowerPoint. Aspose.Slides for .NET is the first and only .NET component that provides functionality to manage PowerPoint documents within your own applications. As with all Aspose .NET components, Aspose.Slides is written in managed C#, incredibly priced and lightning fast. ## **Aspose.Slides for OpenXML** ## **Introduction** The developers looking for file format libraries may need to walk through the features provided by the libraries available on the market. Mainly, two factors are considered when choosing an option: - Features - Efforts required to use the library If you are a .NET developer looking for faster,easy and light-weight file format library to process files, you may need to compare VSTO(Visual Studio tool for Office) with Aspose. In this case, this project will help you to compare features and code in both libraries. ## **System Requirements and Supported Platforms** ### **System Requirements** One or more of the following editions of Visual Studio Tools for Office: - Microsoft Visual Studio 2005 Tools for the Microsoft Office System - Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System - Visual Studio 2008 Professional Edition - Visual Studio 2008 Team Suite Edition - One version of Microsoft Office: - Microsoft Office Professional 2003 SP1 - 2007 Microsoft Office system ### **Supported Operating Systems** - Windows 2000; Windows Server 2003; Windows Vista; Windows XP ### **.NET Framework Versions Supported** - only .NET framework 2.0 or greater. ## **Downloading** You can download the latest code at: - [Github](http://goo.gl/sZsbbu) - [Sourceforge](http://goo.gl/AWc3J3) - [Bitbucket](http://goo.gl/8B9p3b) ## **Installing** To open the project you need to download and install the latest version of Aspose.Slides for .NET from [here](http://www.aspose.com/.net/powerpoint-component.aspx) and include it in the project. ## **Support, Extend and Contribute** ### **Support** We offer free support. Anyone who uses our product, whether they have bought them or are using an evaluation, deserves our full attention and respect. You can log any issues or suggestions related to Aspose .NET for OpenXML using any of the following platforms: - [Github](http://goo.gl/UHkCJe) - [Sourceforge](http://goo.gl/f8zdLU) - [Bitbucket](http://goo.gl/1Eo1DQ) ### **Extend and Contribute** Comparison code for Aspose.Slides for .NET and OpenXML source code is available on major social coding websites listed below.Developers are encouraged to download the source code to migrate from OpenXML to Aspose.Slides as per their requirements. ### **Source Code** You can get the latest source code from one of the following locations. - [Github](https://goo.gl/gN0nf2) - [Sourceforge](https://goo.gl/noku6v) - [Bitbucket](https://goo.gl/T83r2D) ### **How to Configure the Source Code** Please follow these simple steps to get started - Download/Clone the source code. - Open Visual Studio 2010 and Choose File > Open Project. - Browse to the latest source code that you have downloaded and Open the .sln file. ## **Sample Code Examples** This section includes the following topics - [Code Comparison for common features with OpenXML](https://docs.aspose.com/slides/net/code-comparison-for-common-features-with-openxml/) - [Add a comment to a slide](https://docs.aspose.com/slides/net/add-a-comment-to-a-slide/) - [Adding Slide to Presentation](https://docs.aspose.com/slides/net/adding-slide-to-presentation/) - [Apply a theme to a presentation](https://docs.aspose.com/slides/net/apply-a-theme-to-a-presentation/) - [Change the fill color of a shape in a presentation](https://docs.aspose.com/slides/net/change-the-fill-color-of-a-shape-in-a-presentation/) - [Count the number of Slides](https://docs.aspose.com/slides/net/count-the-number-of-slides/) - [Create a presentation document](https://docs.aspose.com/slides/net/create-a-presentation-document/) - [Delete all the comments by an author](https://docs.aspose.com/slides/net/delete-all-the-comments-by-an-author/) - [Delete a Slide](https://docs.aspose.com/slides/net/delete-a-slide/) - [Get all the external hyperlinks in a presentation](https://docs.aspose.com/slides/net/get-all-the-external-hyperlinks-in-a-presentation/) - [Get all the text in all the slides](https://docs.aspose.com/slides/net/get-all-the-text-in-all-the-slides/) - [Get all the text in a slide](https://docs.aspose.com/slides/net/get-all-the-text-in-a-slide/) - [Get the titles of all the slides](https://docs.aspose.com/slides/net/get-the-titles-of-all-the-slides/) - [Move a paragraph from one presentation to another](https://docs.aspose.com/slides/net/move-a-paragraph-from-one-presentation-to-another/) - [Move a slide to a new position](https://docs.aspose.com/slides/net/move-a-slide-to-a-new-position/) - [Missing Features in OpenXML](https://docs.aspose.com/slides/net/missing-features-in-openxml/) - [Access OpenDocument Presentation](https://docs.aspose.com/slides/net/access-opendocument-presentation/) - [Add Layout Slides to Presentation](https://docs.aspose.com/slides/net/add-layout-slides-to-presentation/) - [Conversion from PPT to different formats](https://docs.aspose.com/slides/net/conversion-from-ppt-to-different-formats/) - [Conversion from PPT to PPTX format in Aspose.Slides](https://docs.aspose.com/slides/net/conversion-from-ppt-to-pptx-format-in-aspose-slides/) - [Conversion to HTML](https://docs.aspose.com/slides/net/conversion-to-html/) - [Conversion to PDF](https://docs.aspose.com/slides/net/conversion-to-pdf/) - [Conversion to XPS](https://docs.aspose.com/slides/net/conversion-to-xps/) - [Export Media files to HTML file](https://docs.aspose.com/slides/net/export-media-files-to-html-file/) - [Get the File Format of Presentation](https://docs.aspose.com/slides/net/get-the-file-format-of-presentation/) - [High level Programming with Presentation Document Object Model](https://docs.aspose.com/slides/net/high-level-programming-with-presentation-document-object-model/) - [Assemble Slides](https://docs.aspose.com/slides/net/assemble-slides/) - [Find and Replace in Presentation](https://docs.aspose.com/slides/net/find-and-replace-in-presentation/) - [Presentation Rendering](https://docs.aspose.com/slides/net/presentation-rendering/) - [Conversion to Tiff with Notes](https://docs.aspose.com/slides/net/conversion-to-tiff-with-notes/) - [Rendered As Tiff](https://docs.aspose.com/slides/net/rendered-as-tiff/) - [Rendered As Tiff By User Defined Dimension](https://docs.aspose.com/slides/net/rendered-as-tiff-by-user-defined-dimension/) - [Render Slide As SVG Image](https://docs.aspose.com/slides/net/render-slide-as-svg-image/) - [Render Slide As thumbnail to JPEG](https://docs.aspose.com/slides/net/render-slide-as-thumbnail-to-jpeg/) - [Render Slide As Thumbnail to JPEG by User defined Values](https://docs.aspose.com/slides/net/render-slide-as-thumbnail-to-jpeg-by-user-defined-values/) - [Slide Transitions](https://docs.aspose.com/slides/net/slide-transitions/) - [Working with Size and Layout of Presentation](https://docs.aspose.com/slides/net/working-with-size-and-layout-of-presentation/) ## Related articles - [Aspose.Slides .NET for VSTO](https://docs.aspose.com/slides/net/aspose-slides-net-for-vsto/) - [Aspose.Slides Visual Studio Plugin](https://docs.aspose.com/slides/net/aspose-slides-visual-studio-plugin/) - [Missing Features in OpenXML](https://docs.aspose.com/slides/net/missing-features-in-openxml/) # Aspose.Slides for Xamarin (Historical) > Historical: how Aspose.Slides for .NET versions 20.2 to 22.10 supported Xamarin.Android through a separate library. Current versions do not include it. Source: https://docs.aspose.com/slides/net/aspose-slides-for-xamarin/ Updated: 2026-09-28 This is a historical page. Versions 20.2 to 22.10 of the Aspose.Slides.NET package included a separate Xamarin.Android library, *Aspose.Slides.Droid.dll*, which the code on this page uses. Later versions do not include it: the current package contains builds for .NET Framework 4.6.2, .NET 6, and .NET Standard 2.0 only. Microsoft ended support for all Xamarin SDKs on May 1, 2024; see the [Xamarin support policy](https://dotnet.microsoft.com/en-us/platform/support/policy/xamarin). ## **Introduction** Xamarin is a framework used for mobile development in .NET C#. Xamarin has tools and libraries that extend the capabilities of the .NET platform. It allows developers to build applications for the **Android** operating system. For development in Xamarin, programmers can use their regular development environments (C#, Visual Studio, and 3rd party libraries). Aspose.Slides API worked on the Xamarin platform. To achieve this, the Aspose.Slides.NET package, in versions 20.2 to 22.10, added a separate DLL for Xamarin. Aspose.Slides for Xamarin supported most of the features available in the .NET version: - converting and viewing presentations. - editing contents in presentations: text, shapes, charts, SmartArt, audio/video, fonts, etc. - handling/dealing with animation, 2D effects, WordArt, etc. - handling/dealing with metadata and document properties. - cloning, merging, comparing, splitting, etc. We provided a comparison of the full features in another section close to the bottom of this page. In Aspose.Slides for Xamarin API, the classes, namespaces, logic, and behavior were as similar as possible to the .NET version. You could migrate your Aspose.Slides .NET applications to Xamarin with minimal costs. ## **Quick Example** You could use Aspose.Slides for Xamarin to build and utilize your C# application through Slides for Android. We are providing an example of Android via Xamarin application that uses Aspose.Slides to display presentation slides and adds a new shape on the slide on touch. You can find the full source of the examples on [GitHub](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Xamarin). Let’s start by creating a Xamarin Android App: ![Creating a Xamarin Android app](https://lh3.googleusercontent.com/sNkKZnuuGo8phWI-4g4jRA_ZESKpO9RXehPj46RVymXGPcCJuYooePXcBEcb7N6uUUxgocl4o9OjwnajzWKmL2i4MUz3gKKwXw6C0ow_VScN8vlyGBK3SpLKoE_m9BDJ3iNE4xPj) First, we create a content layout that will contain an image view, Prev, and Next buttons: ![Content layout with an image view and Prev and Next buttons](https://lh3.googleusercontent.com/rX9leIvYTVzQa0YAMj_jPUPs-c9_HwGPZUfR5A3FLiTk0-qzUQ29FfM4hammUVXbbw_Ly0LwEM_VnaI6vslEEMcVlEwVMem0LTiX5kYsA4lxtiHrvXfDPruWPOGU1YKDYSWcNM54) **XML - content_main.xml - Create content layout** ```xml