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

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

2 Answers 101 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Hugo
Top achievements
Rank 1
Hugo asked on 02 Jul 2013, 01:30 PM
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="http://en.wikipedia.org/wiki/Istanbul" Target="_blank">
                <Title Text="Istanbul"></Title>
                <PeekTemplateSettings AnimationDuration="700" ShowInterval="6000" CloseDelay="4000"
                        Animation="Fade" Easing="easeInQuint" ShowPeekTemplateOnMouseOver="true" 
                    HidePeekTemplateOnMouseOut="true" />
            </telerik:RadImageTile>

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 Answers, 1 is accepted

Sort by
0
Hugo
Top achievements
Rank 1
answered on 02 Jul 2013, 01:40 PM
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.
0
Accepted
Marin Bratanov
Telerik team
answered on 04 Jul 2013, 08:43 AM
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: http://www.telerik.com/help/aspnet-ajax/tilelist-server-side-tile-object.html.

Regards,
Marin Bratanov
Telerik
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.
Tags
TileList
Asked by
Hugo
Top achievements
Rank 1
Answers by
Hugo
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or