In the demo application, the effect you are seeing of text being hovered over each item on a mouse over is actually achieved through the use of a custom theme. You can access the source code to the demo application locally on your machine at:
C:\Program Files\Telerik\RadControls for WinForms Q3 2009 SP1\Examples\ExamplesVBVS2008.sln
In the project, the demo application you are referring to is located, under the solution explorer, at:
Examples -> Carousel -> MusicLibrary
In form1.vb the ItemDataBound event looks as follows:
| Private Sub radCarousel1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.ItemDataBoundEventArgs) Handles radCarouselAlbums.ItemDataBound |
| Dim carouselItem As RadButtonElement = CType(e.DataBoundItem, RadButtonElement) |
| carouselItem.TextImageRelation = TextImageRelation.TextAboveImage |
| carouselItem.Font = New Font("Verdana", 10f) |
| carouselItem.ForeColor = Color.WhiteSmoke |
| 'Store data to use later |
| carouselItem.Tag = e.DataItem |
| Dim image As Image = Me.GetImageFromBytes(EvaluatePropertyValue(e.DataItem, "Image")) |
| If image IsNot Nothing Then |
| carouselItem.Image = New Bitmap(image, 165, 165) |
| End If |
| carouselItem.Text = CStr(EvaluatePropertyValue(e.DataItem, "AlbumName")) |
| End Sub |
This event is creating RadButtonElements to be used as carousel items. The TextImageRelation is set to TextAboveImage so the text gets displayed above each button.
In the designer for form1.vb:
Here there is a RadThemeManager that is set up to load ButtonMusicLibrary.xml as the theme for this project. The ButtonMusicLibrary theme contains a specially themed button that gets applied at all buttons added to the RadCarousel.
In looking at ButtonMusicLibrary.xml in Visual Style Builder:
If you select "Text: RadButton" in the Control Structure, at the very bottom of Visual Style builder, you will notice that there are several events set up for this particular style. The one that is most specific to this case is (IsMouseOver and !IsMouseDown). A few animations have been set up for this particular property. In the Expert Mode property window to the right there are animations set up for PositionOffset and Shadow. When (IsMouseOver and !IsMouseDown) occurs on any button that has this theme applied these animations are triggered and this is how, in the demo, floating text is achieved above each item in the carousel.
The other events in Visual Style builder are important to take a look at as well. They may be doing similar/related things depending on the current state of the button.
I hope this information helps. If you are interested in learning more about themes and Visual Style Builder, please check out the following: