Can't add a new item to RadTileView

4 posts, 0 answers
  1. Murat
    Murat avatar
    9 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    Hi,

    We are using socket connections in our projects. And from this socket we get a picture's name and http path. And we show this picture's name in TileViewItem's header, and show the picture in the content of tileviewitem. But there is an issue with TileView, when the new data comes to client we add it to tileview like ((RadFluidContentControl)radTileViewItem1.Content).SmallContent = new Image("image uri") the header of RadTileViewItem updates but the new image does not showing except we change the state of RadTileView item. When the state maximized or minimized the new images are coming.

    How can we solve this? When the socket data comes to the client, we want to update tileView simultaneously and add the incoming picture to the next empty TileViewItem.
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 28 Mar 2011 Link to this post

    Hello Murat,

     There seems to be a problem in the RadFluidContentControl and it doesn't update its layout on content change. For now I can give you a work around - after you load the image you can change the TileState of the item and then return it to the previous like this:

    var container = this.myTileView.Items[0] as RadTileViewItem;
    if (container.TileState == TileViewItemState.Minimized)
    {
        var maximizedItem = this.myTileView.MaximizedItem;
        (container.Content as RadFluidContentControl).SmallContent = image;
        container.TileState = TileViewItemState.Restored;
        this.myTileView.MaximizedItem = maximizedItem;
    }
    else
    {
        (container.Content as RadFluidContentControl).SmallContent = image;
    }
    This will trigger the visual update and show the image. I've attached a sample project with this work around and I've updated your telerik account.
    If you have further questions don't hesitate to ask.


    Greetings,
    Zarko
    the Telerik team
  3. DevCraft banner
  4. Murat
    Murat avatar
    9 posts
    Member since:
    Mar 2011

    Posted 29 Mar 2011 Link to this post

    Hi Zarko,

    First of all thanks for the quick feedback. We examined your sample project you use FluidContentStateConverter in xaml side. We need to do this from code behind. How can we do this?
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 29 Mar 2011 Link to this post

    Hi Murat,

     I've updated the sample project so that it now manages the FluidContentControls states in code behind.
    So could you please examine the attached project and you can also read this help article which shows yet another way to achieve this.
    If you need further assistance feel free to ask.

    Kind regards,
    Zarko
    the Telerik team
Back to Top