We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add or remove Layout groups and image streamer dynamically in WinForms TileLayout?

Platform: WinForms |
Control: TileLayout

Add or remove layout groups and image streamer

In Tile Layout, the Layout groups and ImageStreamer can be added or removed dynamically in TileLayout by following below steps.

Adding an ImageStreamer:

1. Need to add the LayoutGroup to TileGroupCollection by using the property named “Groups” in TileLayout.

2. Need to add required control to ControlCollection of the Layout Group.

Removing an ImageStreamer:

1. Need to iterate the Layout groups.

2. Need to iterate all the controls of the Layout group.

3. Remove the required control from the control collection.


LayoutGroup layoutGroup1 = new LayoutGroup();
// To add the Layout group to TileLayout
ImageStreamer img = new ImageStreamer();
img.BackColor = Color.Red;
// To add the ImageStreamer to Layout group.
//Remove the  controls.
foreach (LayoutGroup lObjGroup in this.tileLayout1.Groups)
    foreach (Control lObjControl in lObjGroup.Controls)


Dim layoutGroup1 As New LayoutGroup()
' To add the Layout group to TileLayout
Dim img As New ImageStreamer()
img.BackColor = Color.Red
' To add the ImageStreamer to Layout group.
'Remove the  controls.
For Each lObjGroup As LayoutGroup In Me.tileLayout1.Groups
    For Each lObjControl As Control In lObjGroup.Controls
    Next lObjControl
Next lObjGroup

 Layout group and Image streamer added dynamically

Figure 1. Layout group and Image streamer added dynamically.

Layout group and Image streamer removed dynamically

Figure 2. Layout group and Image streamer removed dynamically.


C#: TileLayout_Groups_C#

VB: TileLayout_Groups_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile