Problem with

5 posts, 0 answers
  1. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 30 Jun 2010 Link to this post

    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> 
     
  2. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 30 Jun 2010 Link to this post

    Oops, this was supposed to have a title of "Problem with RadTileView, RadFluidContentControl and DataTemplates
  3. UI for WPF is Visual Studio 2017 Ready
  4. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 01 Jul 2010 Link to this post

    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...

  5. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 06 Jul 2010 Link to this post

    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
  6. Lance
    Lance avatar
    49 posts
    Member since:
    May 2008

    Posted 06 Jul 2010 Link to this post

    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> 
     

Back to Top
UI for WPF is Visual Studio 2017 Ready