File Formats

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IGroupShape

    Show / Hide Table of Contents

    Interface IGroupShape

    Represents the group shape in a slide.

    Inherited Members
    ISlideItem.Clone()
    ISlideItem.Description
    ISlideItem.SlideItemType
    ISlideItem.Height
    ISlideItem.Hidden
    ISlideItem.Left
    ISlideItem.LineFormat
    ISlideItem.ShapeName
    ISlideItem.Title
    ISlideItem.Top
    ISlideItem.Width
    Namespace: Syncfusion.Presentation
    Assembly: Syncfusion.Presentation.Base.dll
    Syntax
    public interface IGroupShape : ISlideItem

    Properties

    Fill

    Gets an IFill instance that contains fill formatting properties. Read-only.

    Declaration
    IFill Fill { get; }
    Property Value
    Type Description
    IFill

    The fill.

    Examples
    //Create a new presentation.
    IPresentation presentation = Presentation.Create();
    //Add a blank slide to the presentation.
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add a group shape to the slide
    IGroupShape groupShape = slide.GroupShapes.AddGroupShape(12, 12, 400, 400);
    //Create instance to hold all the shapes in a group shape
    IShapes shapes = groupShape.Shapes;
    //Add auto shapes to group shape
    shapes.AddShape(AutoShapeType.Oval, 47, 50, 60, 120);
    shapes.AddShape(AutoShapeType.Rectangle, 12, 12, 40, 30);
    //Get the fill of a group shape
    IFill fill = groupShape.Fill;
    //Set the fill type for group shape
    fill.FillType = FillType.Solid;
    //Set the color for solid fill
    fill.SolidFill.Color = ColorObject.Red;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create a new presentation.
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add a blank slide to the presentation.
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add a group shape to the slide
    Dim groupShape As IGroupShape = slide.GroupShapes.AddGroupShape(12, 12, 400, 400)
    'Create instance to hold all the shapes in a group shape
    Dim shapes As IShapes = groupShape.Shapes
    'Add auto shapes to group shape
    shapes.AddShape(AutoShapeType.Oval, 47, 50, 60, 120)
    shapes.AddShape(AutoShapeType.Rectangle, 12, 12, 40, 30)
    'Get the fill of a group shape
    Dim fill As IFill = groupShape.Fill
    'Set the fill type for group shape
    fill.FillType = FillType.Solid
    'Set the color for solid fill
    fill.SolidFill.Color = ColorObject.Red
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    Shapes

    Gets an IShapes instance that represents all the elements within the group shape.

    Declaration
    IShapes Shapes { get; }
    Property Value
    Type Description
    IShapes

    The shapes.

    Examples
    //Create a new presentation.
    IPresentation presentation = Presentation.Create();
    //Add a blank slide to the presentation.
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add a group shape to the slide
    IGroupShape groupShape = slide.GroupShapes.AddGroupShape(12, 12, 400, 400);
    //Create instance to hold all the shapes in a group shape
    IShapes shapes = groupShape.Shapes;
    //Add auto shapes to group shape
    shapes.AddShape(AutoShapeType.Oval, 47, 50, 60, 120);
    shapes.AddShape(AutoShapeType.Rectangle, 12, 12, 40, 30);
    //Set description for the group shape
    groupShape.Description = "This is a groupShape";
    //Set title for the group shape
    groupShape.Title = "Group Shape";
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create a new presentation.
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add a blank slide to the presentation.
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add a group shape to the slide
    Dim groupShape As IGroupShape = slide.GroupShapes.AddGroupShape(12, 12, 400, 400)
    'Create instance to hold all the shapes in a group shape
    Dim shapes As IShapes = groupShape.Shapes
    'Add auto shapes to group shape
    shapes.AddShape(AutoShapeType.Oval, 47, 50, 60, 120)
    shapes.AddShape(AutoShapeType.Rectangle, 12, 12, 40, 30)
    'Set description for the group shape
    groupShape.Description = "This is a groupShape"
    'Set title for the group shape
    groupShape.Title = "Group Shape"
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved