Back to Devexpress

ImageSliderItem.Text Property

aspnet-devexpress-dot-web-dot-imageslideritem.md

latest2.9 KB
Original Source

ImageSliderItem.Text Property

Gets or sets the text (description) of the current image item.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public string Text { get; set; }
vb
<DefaultValue("")>
Public Property Text As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value that specifies the text.

|

Remarks

The text specified by the Text property is displayed in the item text area. The area’s visibility can be controlled using the ImageSliderImageAreaSettings.ItemTextVisibility property.

When the AccessibilityCompliant property is enabled, an alternative text for an image is obtained from the Text property. If the Text property is not specified, an image’s filename and extension (saved within the ImageSliderItem.ThumbnailUrl property) are used to define its alternative text.

Example

This code sample demonstrates how you can manually create ASPxImageSlider items and specify the items’ properties.

aspx
<dx:ASPxImageSlider ID="ASPxImageSlider1" runat="server">
     <Items>
          <dx:ImageSliderItem ImageUrl="~/Images/img1.jpg" Name="Sunset" 
               NavigateUrl="~/sunset.asp" Text="Sunset" ThumbnailUrl="~/Thumbnails/thumb1.jpg" />
          <dx:ImageSliderItem ImageUrl="~/Images/img2.jpg" Name="Lupines" 
               NavigateUrl="~/lupines.asp" Text="Lupines" ThumbnailUrl="~/Thumbnails/thumb2.jpg" />
          <dx:ImageSliderItem ImageUrl="~/Images/img3.jpg" Name="Road" 
               NavigateUrl="~/road.asp" Text="Road" ThumbnailUrl="~/Thumbnails/thumb3.jpg" />
     </Items>
</dx:ASPxImageSlider>

See Also

ItemTextVisibility

Image Slider Elements

Image Slider

ImageSliderItem Class

ImageSliderItem Members

DevExpress.Web Namespace