Inheritance Hierarchy Namespace: SautinSoft.Document.DrawingAssembly: SautinSoft.Document (in SautinSoft.Document.dll) Version: 2025.2.13
Syntaxpublic sealed class GroupLayout : Layout
Public NotInheritable Class GroupLayout
Inherits Layout
The GroupLayout type exposes the following members.
Constructors | Name | Description |
---|
  | GroupLayout |
Initializes a new instance of the GroupLayout class
with the specified position and size of a grouped element.
|
Top
Properties
ExampleSee Developer Guide: This sample shows how to work with shape groups
This sample shows how to work with shape groups using C#
using SautinSoft.Document;
using SautinSoft.Document.Drawing;
namespace Sample
{
class Sample
{
static void Main(string[] args)
{
ShapeGroups();
}
public static void ShapeGroups()
{
string pictPath = @"..\..\..\image1.jpg";
string documentPath = @"ShapeGroups.docx";
DocumentCore dc = new DocumentCore();
HorizontalPosition hp = new HorizontalPosition(HorizontalPositionType.Center, HorizontalPositionAnchor.Page);
VerticalPosition vp = new VerticalPosition(5f, LengthUnit.Centimeter, VerticalPositionAnchor.TopMargin);
FloatingLayout fl = new FloatingLayout(hp, vp, new Size(300, 300));
ShapeGroup group = new ShapeGroup(dc, fl);
group.ChildSize = new Size(100, 100);
Shape shape1 = new Shape(dc, new GroupLayout(new Point(0, 0), new Size(50, 50)));
shape1.Outline.Fill.SetSolid(new Color(53, 140, 203));
shape1.Outline.Width = 2;
shape1.Fill.SetSolid(Color.Orange);
shape1.Geometry.SetPreset(Figure.Rectangle);
Picture picture = new Picture(dc, Layout.Group(new Point(50, 50), new Size(50, 50)), pictPath);
picture.ImageData.FillMode = PictureFillMode.Stretch;
group.ChildShapes.Add(shape1);
group.ChildShapes.Add(picture);
dc.Content.End.Insert(group.Content);
dc.Save(documentPath);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(documentPath) { UseShellExecute = true });
}
}
}
This sample shows how to work with shape groups using VB.Net
Imports System
Imports System.IO
Imports SautinSoft.Document
Imports SautinSoft.Document.Drawing
Module Sample
Sub Main()
ShapeGroups()
End Sub
Sub ShapeGroups()
Dim pictPath As String = "..\..\..\image1.jpg"
Dim documentPath As String = "ShapeGroups.docx"
Dim dc As New DocumentCore()
Dim hp As New HorizontalPosition(HorizontalPositionType.Center, HorizontalPositionAnchor.Page)
Dim vp As New VerticalPosition(5.0F, LengthUnit.Centimeter, VerticalPositionAnchor.TopMargin)
Dim fl As New FloatingLayout(hp, vp, New Size(300, 300))
Dim group As New ShapeGroup(dc, fl)
group.ChildSize = New Size(100, 100)
Dim shape1 As New Shape(dc, New GroupLayout(New Point(0, 0), New Size(50, 50)))
shape1.Outline.Fill.SetSolid(New Color("#358CCB"))
shape1.Outline.Width = 2
shape1.Fill.SetSolid(Color.Orange)
shape1.Geometry.SetPreset(Figure.Rectangle)
Dim picture As New Picture(dc, Layout.Group(New Point(50, 50), New Size(50, 50)), pictPath)
picture.ImageData.FillMode = PictureFillMode.Stretch
group.ChildShapes.Add(shape1)
group.ChildShapes.Add(picture)
dc.Content.End.Insert(group.Content)
dc.Save(documentPath)
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(documentPath) With {.UseShellExecute = True})
End Sub
End Module
See Also