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

Data Binding

2 Answers 131 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Arthur Vanderbilt
Top achievements
Rank 1
Arthur Vanderbilt asked on 18 Nov 2009, 08:11 PM

Hi,

I'm trying to figure out how to databind the RadTileView correctly.

The following XAML:

<Grid>
    <telerik:RadTileView
        Margin="12"
        Name="radTileView1"
        ItemsSource="{Binding}">
        <telerik:RadTileView.ItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Path=Description}" />
            </DataTemplate>
        </telerik:RadTileView.ItemTemplate>
    </telerik:RadTileView>
</Grid>

Will get me the boxes with the title bar showing my Description property and the panel part of the box showing the name of the class. I'm not sure where to put the binding information for the body of the panel, and I can't find anything about databinding for this control in the docs. Is there an example somewhere of this control databound?

2 Answers, 1 is accepted

Sort by
0
Accepted
Tihomir Petkov
Telerik team
answered on 18 Nov 2009, 08:31 PM
Hello Arthur,

Here are the two properties most commonly used for binding the TileView:

- ItemTemplate: a DataTemplate that specifies how data will be rendered in the header if a tile.
- ContentTemplate: a DataTemplate that specifies what will be rendered in the content area of a tile.

So, in the code snippet you provided you only need to specify a ContentTemplate in which to provide a visual element that will render what you want to show in the content area. Let me know if you have any difficulties.

Best wishes,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Arthur Vanderbilt
Top achievements
Rank 1
answered on 18 Nov 2009, 08:33 PM
That was it, thank you very much.
Tags
TileView
Asked by
Arthur Vanderbilt
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Arthur Vanderbilt
Top achievements
Rank 1
Share this question
or