Aspose.Slides.Examples.CSharp.SmartArts.ChangSmartArtShapeStyle.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:ChangSmartArtShapeStyle
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_SmartArts();

            using (Presentation presentation = new Presentation(dataDir + "AccessSmartArtShape.pptx"))
            {
                // Traverse through every shape inside first slide
                foreach (IShape shape in presentation.Slides[0].Shapes)
                {
                    // Check if shape is of SmartArt type
                    if (shape is ISmartArt)
                    {
                        // Typecast shape to SmartArtEx
                        ISmartArt smart = (ISmartArt)shape;

                        // Checking SmartArt style
                        if (smart.QuickStyle == SmartArtQuickStyleType.SimpleFill)
                        {
                            // Changing SmartArt Style
                            smart.QuickStyle = SmartArtQuickStyleType.Cartoon;
                        }
                    }
                }

                // ExEnd:ChangSmartArtShapeStyle
                // Saving Presentation
                presentation.Save(dataDir + "ChangeSmartArtStyle_out.pptx", SaveFormat.Pptx);
            }
        }
    }
ChangSmartArtShapeStyle