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

Can't add a new item to RadTileView

3 Answers 86 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Murat
Top achievements
Rank 1
Murat asked on 28 Mar 2011, 10:30 AM
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.

3 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 28 Mar 2011, 12:44 PM
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
0
Murat
Top achievements
Rank 1
answered on 29 Mar 2011, 08:40 AM
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?
0
Zarko
Telerik team
answered on 29 Mar 2011, 09:23 AM
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
Tags
TileView
Asked by
Murat
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Murat
Top achievements
Rank 1
Share this question
or