This is a migrated thread and some comments may be shown as answers.

Tile reposition and resizing (ReArrange Needed)

2 Answers 167 Views
Panorama
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 14 Nov 2014, 01:36 PM
Hi, 
Please refer the the image to understand the scenario:

Image  t01.png: I have 3 tiles [red colspan=2 rowspan=2] [green 1, 1] [ping 1 1]
Image t02.png: I right click on the red tile to change the size from large to small (colspan 1, rowspan 1)
image t03.png: After resize, the is a need to refresh RadPanorama you may notice the text under the red tile
image t04.png: when trying to move the green tile, the Panorama control auto refresh and remove the text.
image t05.png: I manually arranged the tiles, then I need to make the red tile Large (colspan 2, rowspan 2)
image t06.png: After red tile size change, layout is corrupt, HOW CAN WE REARRANGE TILES, without implementing our own logic, which is complex as I think
image t07.png: trying to reposition.
image t08.png: that's what I expected.


Code used to resize:

Private Sub RadMenuItem1_Click(sender As Object, e As EventArgs) Handles RadMenuItem1.Click
       'Small
 
       'RadPanorama1.SuspendUpdate()
       tileBig.ColSpan = 1
       tileBig.RowSpan = 1
       tileBig.Size = New Size(200, 200)
       'RadPanorama1.ResumeUpdate()
       RadPanorama1.Refresh()
       'ReArrange()
   End Sub


Private Sub RadMenuItem3_Click(sender As Object, e As EventArgs) Handles RadMenuItem3.Click
       'Large
       tileBig.ColSpan = 2
       tileBig.RowSpan = 2
 
       ' tileBig.Size = New Size(400, 400)
 
       RadPanorama1.Refresh()
       'ReArrange()
   End Sub


Please advise.














2 Answers, 1 is accepted

Sort by
0
Sam
Top achievements
Rank 1
answered on 18 Nov 2014, 09:54 AM
I didn't find any solution to solve TileList bugs in WPF or WinForms, TileList for WPF and Panorama for WinForms are not ready for production! contains major issues and can't be used in production system, actually we purchased Telerik for TileList controls or panorama, unfortunately I can't use them in my application.
(WPF Question: http://www.telerik.com/forums/pragmatically-tiletype-problem-and-tile-reorder-problem)


0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Nov 2014, 09:36 AM
Hello Sam,

Thank you for writing.

Each RadTileElement is positioned in the RadPanorama according to the RadTileElement.Row and the RadTileElement.Column properties. Hence, you can have overlapping tiles if they have identical Row and Column values. This is the case illustrated on the provided screenshot t06.png. Tiles are not re-arranged automatically when resizing. Note that when you resize a RadTileElement it is necessary to shift the rest of the tiles according to your requirements. It means that you should adjust the RadTileElement.Row and the RadTileElement.Column properties in correspondence with the resized RadTileElement's RowSpan and ColSpan values. Here is a sample example for the described scenario.
Dim tile1 As New RadTileElement
Dim tile2 As New RadTileElement
Dim tile3 As New RadTileElement
 
Sub New()
    InitializeComponent()
    Me.RadPanorama1.ColumnsCount = 3
    Me.RadPanorama1.RowsCount = 3
 
    tile1.Row = 0
    tile1.Column = 0
    tile1.RowSpan = 2
    tile1.ColSpan = 2
    tile1.Text = "Tile 1"
    tile1.BackColor = Color.Red
    Me.RadPanorama1.Items.Add(tile1)
 
 
    tile2.Row = 2
    tile2.Column = 0
    tile2.RowSpan = 1
    tile2.ColSpan = 1
    tile2.Text = "Tile 2"
    tile2.BackColor = Color.Fuchsia
    Me.RadPanorama1.Items.Add(tile2)
 
 
    tile3.Row = 0
    tile3.Column = 2
    tile3.RowSpan = 1
    tile3.ColSpan = 1
    tile3.Text = "Tile 3"
    tile3.BackColor = Color.Green
    Me.RadPanorama1.Items.Add(tile3)
 
End Sub
 
Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
    tile1.RowSpan = 1
    tile1.ColSpan = 1
    Me.RadPanorama1.PanoramaElement.InvalidateMeasure(True)
 
    're-arrange  tiles
    tile2.Row -= tile1.RowSpan
    tile3.Column -= tile1.ColSpan
End Sub
 
Private Sub RadButton2_Click(sender As Object, e As EventArgs) Handles RadButton2.Click
    tile1.RowSpan = 2
    tile1.ColSpan = 2
    Me.RadPanorama1.PanoramaElement.InvalidateMeasure(True)
 
    're-arrange  tiles
    tile2.Column = tile1.RowSpan
    tile3.Column = tile1.ColSpan
End Sub

Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify it on a way which suits your requirement best.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Panorama
Asked by
Sam
Top achievements
Rank 1
Answers by
Sam
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or