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

Problem with

4 Answers 46 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Lance
Top achievements
Rank 1
Lance asked on 30 Jun 2010, 11:28 PM
Hello,
I am running into a problem with the RadTileView, and the RadFluidContentControl.  I am binding the ItemsSource to a list in my ViewModel, and in turn, I am using the ContentTemplate to render the items, I added a RadFluidContentControl, and use the SmallContentTemplate, MediumContentTemplate, and LargeContentTemplate but it never changes the content in the template,  The same xaml using hard coded content seems to work fine.  Is this a bug in the RadFluidContentControl,or am I using it wrong? 
Below is the Xaml that I am working with.  Rooms is a list of classes with a "DisplayName" property.

Thanks in advance for any help.
        <telerik:RadTileView Margin="8" MinimizedColumnWidth="220" ItemsSource="{Binding Rooms}" > 
            <telerik:RadTileView.ItemTemplate> 
                <DataTemplate> 
                    <TextBlock Text="{Binding DisplayName}">  
                    </TextBlock> 
                </DataTemplate> 
            </telerik:RadTileView.ItemTemplate> 
            <telerik:RadTileView.ContentTemplate> 
                <DataTemplate> 
                    <telerik:RadFluidContentControl BorderBrush="black" BorderThickness="2" SmallToNormalThreshold="190, 140" 
                                    NormalToSmallThreshold="190, 140" NormalToLargeThreshold="320, 320" 
                                    LargeToNormalThreshold="320, 320" ContentChangeMode="Automatic">  
                        <telerik:RadFluidContentControl.SmallContentTemplate> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock Text="{Binding DisplayName}"></TextBlock> 
                                    <TextBlock Text="small"></TextBlock> 
                                </Grid> 
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.SmallContentTemplate> 
                        <telerik:RadFluidContentControl.ContentTemplate> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock Text="{Binding DisplayName}"></TextBlock> 
                                    <TextBlock Text="Medium"></TextBlock> 
                                </Grid> 
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.ContentTemplate> 
                        <telerik:RadFluidContentControl.LargeContentTemplate> 
                            <DataTemplate> 
                                <local:RoomControl Margin="10" HorizontalAlignment="Left" VerticalAlignment="Top"  DataContext="{Binding}"/>  
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.LargeContentTemplate> 
                    </telerik:RadFluidContentControl> 
                </DataTemplate> 
            </telerik:RadTileView.ContentTemplate> 
        </telerik:RadTileView> 
 

4 Answers, 1 is accepted

Sort by
0
Lance
Top achievements
Rank 1
answered on 01 Jul 2010, 03:03 AM
Oops, this was supposed to have a title of "Problem with RadTileView, RadFluidContentControl and DataTemplates
0
Lance
Top achievements
Rank 1
answered on 01 Jul 2010, 11:37 PM
Ok, I resolved this today at the office, but I didn't have time to post my changes.  I basically had to use the Content property of the fluid control, and change the way I was handling the templates.  I don't recall the specifics, but it was a pretty simple fix.  I'll try to post the code tomorrow in case anyone else needs it...

0
Kiril Stanoev
Telerik team
answered on 06 Jul 2010, 07:32 AM
Hello Lance,

Thank you for updating us on the thread. Let us know if you encounter any further issues.

On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverlight applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

Greetings,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lance
Top achievements
Rank 1
answered on 06 Jul 2010, 08:48 PM

Here is the relevent change, all I needed to do was not use the fluidcontrol ContentTemplate and just set the datacontext in the child elements of the Content.  Pretty simple, and solved my problem if anyone else runs into it

                        <telerik:RadFluidContentControl.LargeContent> 
                            <Grid DataContext="{Binding}"> 
                                <local:RoomControl Margin="10" HorizontalAlignment="Left" VerticalAlignment="Top" DataContext="{Binding}/>  
                            </Grid> 
                        </telerik:RadFluidContentControl.LargeContent> 
 

Tags
TileView
Asked by
Lance
Top achievements
Rank 1
Answers by
Lance
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or