[Solved] Resizing the Form the Panorama is on

1 Answer 27 Views
Panorama
Simon
Top achievements
Rank 2
Iron
Iron
Simon asked on 28 Jul 2026, 03:26 PM

I'm enjoying using the Panorama control and it is quite a useful too for listing a lot of items or showing a User Selection screen (which I will want to use it for eventually. But I will not always know the size of the screen that the control will be used on and so hard setting the RowsCount property just feels like poor programming. See the attached image (DatabaseList) for example.

Is there a way to have the RowsCount dynamic and take up as much room as it can without showing half a tile at the bottom of the screen or form please? If there was a way to they have this refresh if and when the form is resized that would be even better.

Thank you in advance.

Simon

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 31 Jul 2026, 09:08 AM

Hi Simon,

Thank you for your interest in our RadPanorama control for WinForms.

If I have correctly understood your scenario, you want ot adjust the tile size when additional rows are inserted. For example, when adding more rows with tiles, their size should reduce so that they are fully visible. In general, such behavior is not supported out of the box. You could control the tile size by modifying the CellSize property of the RadPanorama. For example, increasing the RowsCount should reduce the height of the CellSize. And decreasing the RowsCount should increase the height. However, this won't happen automatically. You can use custom logic similar to to this one for increasing the RowsCount:

private void radButton1_Click(object sender, EventArgs e)
{
    this.radPanorama1.RowsCount += 1;
    this.radPanorama1.CellSize = new Size(this.radPanorama1.CellSize.Width, this.radPanorama1.CellSize.Height - 10);           
}

The logic for the RowsCount decrease will be very similar, by adding +10 at the end. 

May I ask you to confirm that I am on the right track or that I have misunderstood your scenario?

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Modernizing a WinForms application? Use the AI-powered WinForms Converter to simplify migration to Telerik UI for WinForms.
Simon
Top achievements
Rank 2
Iron
Iron
commented on 06 Aug 2026, 05:58 PM

Hi there,

This is not quite what I mean but close I think.

If I load a form in a windowed state and the panorama is the full size of the form and can happily contain 4 rows at that point, all information and tiles are then populated into it and accessed via the horizontal scroll as usual - all good.

The user then decides to resize this form to make it smaller and so the bottom row is now only showing the top portion of the tile. Are there events or methods I can hook that will tell me that a tile is only partially showing and that I need to now call some code to make the row count less or is there a method where the rows just automatically adjust to fit as many full rows as possible...?

Thank you again in advance.

Simon

Dinko | Tech Support Engineer
Telerik team
commented on 11 Aug 2026, 10:14 AM

The control does not provide an event or any other method that can be used to be notified when an item in the RadPanorama view is not fully visible. However, I think that you could use some custom code to get the size of the control/form and modify the CellSize property so that the items are fully visible. This means the size of the items will increase when the RadPanorama control increases, and vice versa. For this case, you can subscribe to the SizeChanged event of the Form and create a custom method that calculates the size and sets the CellSize property.

private void UpdateCellSize()
{
    if (this.radPanorama1.RowsCount <= 0)
        return;

    int availableHeight = this.radPanorama1.Height - this.radPanorama1.ScrollBarThickness;
    int cellHeight = Math.Max(50, availableHeight / this.radPanorama1.RowsCount);
    int cellWidth = cellHeight;

    this.radPanorama1.CellSize = new Size(cellWidth, cellHeight);
}

I am also attaching my test project with the custom code. You can extend the code to cover your scenarios. I hope that this approach will work for you. When you run the project, resize the form and observe how the items resize.

 

Simon
Top achievements
Rank 2
Iron
Iron
commented on 12 Aug 2026, 03:52 PM

Hello Dinko,

Thank you for this.

Is it possible to have the example in vb.net please?

Sorry to ask.

Thank you.

Simon

Dinko | Tech Support Engineer
Telerik team
commented on 14 Aug 2026, 01:21 PM

No problem at all. Here is the VB version of the shared project.
Tags
Panorama
Asked by
Simon
Top achievements
Rank 2
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or