Creating image tiles in codebehind - how set the name / title

3 posts, 1 answers
  1. Hugo
    Hugo avatar
    5 posts
    Member since:
    Jun 2013

    Posted 02 Jul 2013 Link to this post

    Hi all,

    We're using the tilelist control and trying to create the tiles in the codebehind and so far we built the tiles and show them on the page.
    We want to also show a title / text for each title, we're trying to do this by mimic the markup with c# code.

                <telerik:RadImageTile Name="Istanbul" ImageUrl="../images/Tiles/Wide/Istanbul.png" Shape="Wide"
                    NavigateUrl="" Target="_blank">
                    <Title Text="Istanbul"></Title>
                    <PeekTemplateSettings AnimationDuration="700" ShowInterval="6000" CloseDelay="4000"
                            Animation="Fade" Easing="easeInQuint" ShowPeekTemplateOnMouseOver="true" 
                        HidePeekTemplateOnMouseOut="true" />

    Our issue here is that we aren't able to add the Title on the RadImageTile control. We've already tryed the:
    1. Title property on the RadImageTile, 
    2. Name property on the RadImageTile
    3. Adding the TileTitle control to the RadImageTile child controls (the tiletitle doesn't inherit from control).

    How can we achive this?

    Thanks and regards,
    Hugo Figueira
  2. Hugo
    Hugo avatar
    5 posts
    Member since:
    Jun 2013

    Posted 02 Jul 2013 Link to this post

    We've solved this by using RadImageAndTextTile instead of RadImageTile.
    The RadImageAndText has a property Text that puts the text in the Tile.

    Thanks so much for the time.
  3. Answer
    Marin Bratanov
    Marin Bratanov avatar
    5017 posts

    Posted 04 Jul 2013 Link to this post

    Hello Hugo,

    The Title and Badge inner tags in th markup correspond to classes in the code-behind, so here is how you would set server-side properties of the control:
    RadImageTile tile = new RadImageTile();
    tile.ImageUrl = "someImage.png";
    tile.Title.Text = "title text";
    tile.Badge.Value = 123;
    tile.PeekTemplateSettings.ShowPeekTemplateOnMouseOver = true;

    The full API exposed by the tiles is available here:

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top