## ShapeCollection.Group method

对形状进行分组。

```csharp
public GroupShape Group(Shape[] groupItems)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| groupItems | Shape[] | 组项目。 |

### 返回值

返回组形状。

### 评论

groupItems 中的形状不应分组。 形状必须在此 Shapes 集合中。

### 例子

```csharp

[C#]
//添加第一个形状
shapes.AddRectangle(2, 0, 2, 0, 50, 50);
//添加第二个形状
shapes.AddRectangle(6, 0, 2, 0, 30, 30);

Shape[] shapesArr = new Shape[] { shapes[0], shapes[1] };
GroupShape groupShape = shapes.Group(shapesArr);

```

### 也可以看看

* class [GroupShape](../../groupshape)
* class [Shape](../../shape)
* class [ShapeCollection](../../shapecollection)
* 命名空间 [Aspose.Cells.Drawing](../../shapecollection)
* 部件 [Aspose.Cells](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
