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

Right column keeps growing

1 Answer 48 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 06 Mar 2012, 12:48 PM
Hi,

I am really struggling to make the RadTileView work.

After trying to make it work with my own code I couldn't make the SmallContent to show properly on the right.
Then, a bit desperate, I downloaded an old project from the forum (it uses dlls from the year 2010) and it works as expected. After that I have referenced the latest SL5 DLLs and again I get a weird behaviour.

What I get now is the column from the right growing constantly (Maybe I should post a video because it is even funny :)).

The code is really simple:
<Grid x:Name="LayoutRoot">
        <telerikNavigation:RadTileView x:Name="tileView1" DisplayMemberPath="Name">
            <telerikNavigation:RadTileView.ContentTemplate>
                <DataTemplate>
                    <telerik:RadFluidContentControl SmallToNormalThreshold="240, 120"
                            NormalToSmallThreshold="240, 120"
                            NormalToLargeThreshold="240, 120"
                            LargeToNormalThreshold="240, 120">
                        <telerik:RadFluidContentControl.Content>
                            <Border>
                                <TextBlock Text="{Binding Name}" />
                            </Border>
                        </telerik:RadFluidContentControl.Content>
                        <telerik:RadFluidContentControl.LargeContent>
                            <Grid>
                                <ListBox ItemsSource="{Binding Children}" />
                            </Grid>
                        </telerik:RadFluidContentControl.LargeContent>
                    </telerik:RadFluidContentControl>
                </DataTemplate>
            </telerikNavigation:RadTileView.ContentTemplate>
        </telerikNavigation:RadTileView>
    </Grid>

And the code behind where I am creating the items is even simpler:
public partial class MainPage : UserControl
    {
        private ObservableCollection<DataItem> itemsSource =
            new ObservableCollection<DataItem>();
        public MainPage()
        {
            InitializeComponent();
            for (int i = 0; i < 10; i++)
            {
                DataItem d = new DataItem();
                d.Name = string.Format("Item {0}", i);
                for (int j = 0; j < 20; j++)
                {
                    d.Children.Add(j);
                }
                itemsSource.Add(d);
            }
            tileView1.ItemsSource = itemsSource;
        }
    }
 
    public class DataItem
    {
        public DataItem()
        {
            this.Children = new ObservableCollection<int>();
        }
        public string Name { get; set; }
        public ObservableCollection<int> Children { get; set; }
    }


Can you pass me a working sample project or tell me what am I doing wrong?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 07 Mar 2012, 10:39 AM
Update!

I followed the instructions at this page and it worked like a charm.

Regards.
Tags
TileView
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Share this question
or