Data Binding

3 posts, 1 answers
  1. Arthur Vanderbilt
    Arthur Vanderbilt avatar
    6 posts
    Member since:
    Nov 2009

    Posted 18 Nov 2009 Link to this post

    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. Answer
    Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 18 Nov 2009 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Arthur Vanderbilt
    Arthur Vanderbilt avatar
    6 posts
    Member since:
    Nov 2009

    Posted 18 Nov 2009 Link to this post

    That was it, thank you very much.
Back to Top