Tile reposition and resizing (ReArrange Needed)

3 posts, 0 answers
  1. Sam
    Sam avatar
    8 posts
    Member since:
    Nov 2014

    Posted 14 Nov 2014 Link to this post

    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
           tileBig.ColSpan = 1
           tileBig.RowSpan = 1
           tileBig.Size = New Size(200, 200)
       End Sub

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

    Please advise.

  2. Sam
    Sam avatar
    8 posts
    Member since:
    Nov 2014

    Posted 18 Nov 2014 in reply to Sam Link to this post

    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)

  3. Dess
    Dess avatar
    2164 posts

    Posted 19 Nov 2014 Link to this post

    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()
        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
        tile2.Row = 2
        tile2.Column = 0
        tile2.RowSpan = 1
        tile2.ColSpan = 1
        tile2.Text = "Tile 2"
        tile2.BackColor = Color.Fuchsia
        tile3.Row = 0
        tile3.Column = 2
        tile3.RowSpan = 1
        tile3.ColSpan = 1
        tile3.Text = "Tile 3"
        tile3.BackColor = Color.Green
    End Sub
    Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        tile1.RowSpan = 1
        tile1.ColSpan = 1
        '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
        '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.


    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.

Back to Top