Created
January 24, 2025 13:34
Aspose.Words for .NET. Add group shape using C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git. | |
Document doc = new Document(); | |
doc.EnsureMinimum(); | |
GroupShape groupShape = new GroupShape(doc); | |
Shape accentBorderShape = new Shape(doc, ShapeType.AccentBorderCallout1) { Width = 100, Height = 100 }; | |
groupShape.AppendChild(accentBorderShape); | |
Shape actionButtonShape = new Shape(doc, ShapeType.ActionButtonBeginning) | |
{ | |
Left = 100, Width = 100, Height = 200 | |
}; | |
groupShape.AppendChild(actionButtonShape); | |
groupShape.Width = 200; | |
groupShape.Height = 200; | |
groupShape.CoordSize = new Size(200, 200); | |
DocumentBuilder builder = new DocumentBuilder(doc); | |
builder.InsertNode(groupShape); | |
doc.Save(ArtifactsDir + "WorkingWithShapes.AddGroupShape.docx"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment