Aspose.Slides.Examples.CSharp.SmartArts.AccessSmartArtParticularLayout.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:AccessSmartArtParticularLayout
            // 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 Layout
                        if (smart.Layout == SmartArtLayoutType.BasicBlockList)
                        {
                            Console.WriteLine("Do some thing here....");
                        }
                    }
                }
            }
        }
    }
AccessSmartArtParticularLayout