New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

RadImageGallery control. See RadImageGallery Overview topic for more information.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[ToolboxBitmap(typeof(RadImageGallery), "Toolbox.Icons.ImageGallery.png")]
[TelerikToolboxCategory("Data")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadGrid))]
[RequiredScript(typeof(ImageAnimations), 1)]
[ClientScriptResource("Telerik.Web.UI.RadImageGallery", "Telerik.Web.UI.ImageGallery.RadImageGalleryScripts.js")]
[EmbeddedSkin("ImageGallery")]
[EmbeddedSkin("ImageGallery", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadImageGallery))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Mobile, typeof(RadImageGallery))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadImageGallery))]
[RequiredScript(typeof(KeyboardNavigation))]
[RequiredScript(typeof(GestureFramework))]
[RequiredScript(typeof(PinchZoomUtility))]
[RequiredScript(typeof(MaterialRipple))]
public class RadImageGallery : RadCompositeDataBoundControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, IFeatureGroup, INamingContainer, IPostBackEventHandler, ICallbackEventHandler

Inheritance: objectControlWebControlBaseDataBoundControlDataBoundControlCompositeDataBoundControlRadCompositeDataBoundControlRadImageGallery...

Implements: IAttributeAccessorICallbackEventHandlerIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorIFeatureGroupINamingContainerIParserAccessorIPostBackDataHandlerIPostBackEventHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members CompositeDataBoundControl.PerformDataBinding(IEnumerable)CompositeDataBoundControl.IsUsingModelBindersCompositeDataBoundControl.UpdateMethodCompositeDataBoundControl.DeleteMethodCompositeDataBoundControl.InsertMethodCompositeDataBoundControl.ControlsDataBoundControl.OnCreatingModelDataSource(CreatingModelDataSourceEventArgs)DataBoundControl.CreateDataSourceSelectArguments()DataBoundControl.GetData()DataBoundControl.GetDataSource()DataBoundControl.MarkAsDataBound()DataBoundControl.OnDataPropertyChanged()DataBoundControl.OnDataSourceViewChanged(object, EventArgs)DataBoundControl.OnLoad(EventArgs)DataBoundControl.OnPagePreLoad(object, EventArgs)DataBoundControl.PerformSelect()DataBoundControl.ValidateDataSource(object)DataBoundControl.DataMemberDataBoundControl.ItemTypeDataBoundControl.SelectMethodDataBoundControl.DataSourceObjectDataBoundControl.SelectArgumentsDataBoundControl.CreatingModelDataSourceDataBoundControl.CallingDataMethodsBaseDataBoundControl.ConfirmInitState()BaseDataBoundControl.DataBind()BaseDataBoundControl.EnsureDataBound()BaseDataBoundControl.OnDataBound(EventArgs)BaseDataBoundControl.OnPreRender(EventArgs)BaseDataBoundControl.InitializedBaseDataBoundControl.IsBoundUsingDataSourceIDBaseDataBoundControl.IsDataBindingAutomaticBaseDataBoundControl.SupportsDisabledAttributeBaseDataBoundControl.RequiresDataBindingBaseDataBoundControl.DataBoundWebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.MergeStyle(Style)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipWebControl.WidthControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.MapPathSecure(string)Control.OpenFile(string)Control.BuildProfileTree(string, bool)Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadImageGallery()

Fields

Change Item Index command name constant

C#
public const string ChangeItemIndexCommandName = "ChangeItemIndex"

Change Page Size command name constant

C#
public const string ChangePageSizeCommandName = "ChangePageSize"

First Page command name constant

C#
public const string FirstPageCommandArgument = "First"

Last Page command name constant

C#
public const string LastPageCommandArgument = "Last"

Next Page command name constant

C#
public const string NextPageCommandArgument = "Next"

Page command name constant

C#
public const string PageCommandName = "Page"

Prev Page command name constant

C#
public const string PrevPageCommandArgument = "Prev"

RebindImageGallery command constant

C#
public const string RebindImageGalleryCommandName = "RebindImageGallery"

Properties

Gets or sets a value indicating whether the automatic paging feature is enabled.

C#
public bool AllowPaging { get; set; }

Gets or sets a value that indicates whether Items collection is cleared before DataBinding.

C#
public bool AppendDataBoundItems { get; set; }

Gets or sets the ID of the ClientDataSource control which is used for client-side databinding scenarios.

C#
public string ClientDataSourceID { get; set; }

Gets the settings associated with the RadImageGallery Toolbar.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryClientSettings ClientSettings { get; }

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadCompositeDataBoundControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Gets or sets the selected culture. Localization strings will be loaded based on this value.

C#
public CultureInfo Culture { get; set; }
Property Value:

The selected culture. Localization strings will be loaded based on this value.

Gets or sets a value indicating the index of the current page the RadImageGallery is paged on.

C#
public int CurrentItemIndex { get; set; }

Gets or sets an integer value representing the current page index.

C#
public int CurrentPageIndex { get; set; }

Note that the AllowPaging should be set to 'true' in order for the property to take effect.

Gets or sets a string value determining the field in the DataSource which the RadImageGallery control will bind its items' Description property.

C#
public string DataDescriptionField { get; set; }

Gets or sets a string value determining the field in the DataSource which the RadImageGallery control will bind its items' ImageUrl or ImageDataValue property. The field could be of type String for specifying the ImageUrl value. Or byte array(byte[]) for specifying the ImageDataValue.

C#
public string DataImageField { get; set; }

Gets or sets an array of data-field names that will be used to populate the DataKeyValues collection, when the RadImageGallerycontrol is databinding.

C#
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[TypeConverter(typeof(StringArrayConverter))]
public virtual string[] DataKeyNames { get; set; }

Gets or sets the object from which the data-bound control retrieves its list of data items.

C#
public override object DataSource { get; set; }
Property Value:

An object that represents the data source from which the data-bound control retrieves its data. The default is null.

Overrides: RadCompositeDataBoundControl.DataSource

Gets or sets the ID of the control from which the data-bound control retrieves its list of data items.

C#
public override string DataSourceID { get; set; }
Property Value:

The ID of a control that represents the data source from which the data-bound control retrieves its data.

Overrides: RadCompositeDataBoundControl.DataSourceID

Gets or sets a string value determining the field in the DataSource which the RadImageGallery control will bind its items' ImageUrl or ThumbnailDataValue property. The field could be of type String for specifying the ImageUrl value. Or byte array(byte[]) for specifying the ImageDataValue.

C#
public string DataThumbnailField { get; set; }

Gets or sets a string value determining the field in the DataSource which the RadImageGallery control will bind its items' Title property.

C#
public string DataTitleField { get; set; }

Gets or sets a value indicating the mode the RadImageGallery control will operate in. The mode determines the appearance and the way the entire control will work.

C#
public ImageGalleryDisplayAreaMode DisplayAreaMode { get; set; }

Determines if the control will have WAI-ARIA support enabled

C#
public bool EnableAriaSupport { get; set; }

Gets or sets the value, indicating whether to render the link to the embedded base stylesheet of the control or not.

C#
public override bool EnableEmbeddedBaseStylesheet { get; set; }

Overrides: RadCompositeDataBoundControl.EnableEmbeddedBaseStylesheet

If EnableEmbeddedBaseStylesheet is set to false you will have to register the needed control base CSS file by hand.

Gets or sets the value, indicating whether to render script references to the embedded scripts or not.

C#
public override bool EnableEmbeddedScripts { get; set; }

Overrides: RadCompositeDataBoundControl.EnableEmbeddedScripts

If EnableEmbeddedScripts is set to false you will have to register the needed Scripts files by hand.

Gets or sets the value, indicating whether to render links to the embedded skins or not.

C#
public override bool EnableEmbeddedSkins { get; set; }

Overrides: RadCompositeDataBoundControl.EnableEmbeddedSkins

If EnableEmbeddedSkins is set to false you will have to register the needed CSS files by hand.

Gets the settings for the RadImageGallery ImageArea.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryImageAreaSettings ImageAreaSettings { get; }

A relative or absolute path to a folder from which the RadImageGallery items will be populated.

C#
public string ImagesFolderPath { get; set; }

Items

ImageGalleryItemCollection

Gets the items collection which holds the data associated with the items that will be populated in the ThumbnailArea and the items that will be shown in the current content view mode.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryItemCollection Items { get; }

Gets a reference to the RadLightBox control used when DisplayAreaMode is equal to 'LightBox'.

C#
[Browsable(false)]
public RadLightBox LightBox { get; }

Gets the RadAjaxLoadingPanel control that will be displayed when waiting for the image

C#
[Browsable(false)]
public RadAjaxLoadingPanel LoadingPanel { get; }

Gets or sets a value indicating where RadImageGallery will look for its .resx localization file. By default this file should be in the App_GlobalResources folder. However, if you cannot put the resource file in the default location or .resx files compilation is disabled for some reason (e.g. in a DotNetNuke environment), this property should be set to the location of the resource file.

C#
public string LocalizationPath { get; set; }
Property Value:

A relative path to the dialogs location. For example: "~/controls/RadImageGalleryResources/".

If specified, the LocalizationPath property will allow you to load the grid localization file from any location in the web application.

If enabled, this will loop the items when the last/first one is reached.

C#
public bool LoopItems { get; set; }

Gets a reference to the ImageGalleryPagerStyle, which holds properties for controlling the behavior of the RadImageGallery pager item.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryPagerStyle PagerStyle { get; }

Gets or sets an integer value indicating the number of items that will be populated in the RadImageGallery ThumbnailArea.

C#
public int PageSize { get; set; }

Note that the AllowPaging should be set to 'true' in order for the property to take effect.

C#
[Browsable(false)]
public RadToolTip RadToolTip { get; }

Determines if the RadImageGallery control will display loading panel when image is being loaded.

C#
public bool ShowLoadingPanel { get; set; }

Gets or sets the skin name for the control user interface.

C#
public override string Skin { get; set; }
Property Value:

A string containing the skin name for the control user interface. The default is string.Empty.

Overrides: RadCompositeDataBoundControl.Skin

If this property is not set, the control will render using the skin named "Default". If EnableEmbeddedSkins is set to false, the control will not render skin.

C#
protected override bool SupportsRenderingMode { get; }

Overrides: RadCompositeDataBoundControl.SupportsRenderingMode

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets a reference to the RadListView control that is used inside the RadImageGallery ThumbnailArea. The RadListView holds the thumbnails items created from the Items collection.

C#
[Browsable(false)]
public RadListView ThumbnailListView { get; }

Gets the settings for the RadImageGallery ThumbnailArea.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryThumbnailsAreaSettings ThumbnailsAreaSettings { get; }

Gets the settings associated with the RadImageGallery Toolbar.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryToolbarSettings ToolbarSettings { get; }

Methods

C#
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadCompositeDataBoundControl.AddAttributesToRender(HtmlTextWriter)

C#
protected override void CreateChildControls()

Overrides: CompositeDataBoundControl.CreateChildControls()

C#
protected override int CreateChildControls(IEnumerable dataSource, bool dataBinding)
Parameters:dataSourceIEnumerabledataBindingboolReturns:

int

Overrides: RadCompositeDataBoundControl.CreateChildControls(IEnumerable, bool)

C#
protected override void DescribeClientEvents(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadCompositeDataBoundControl.DescribeClientEvents(IScriptDescriptor)

C#
protected override void DescribeClientProperties(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadCompositeDataBoundControl.DescribeClientProperties(IScriptDescriptor)

Loads the client state data

C#
protected override bool LoadClientState(Dictionary<string, object> clientState)
Parameters:clientStateDictionary<string, object>Returns:

bool

Overrides: RadCompositeDataBoundControl.LoadClientState(Dictionary<string, object>)

C#
protected override void LoadControlState(object savedState)
Parameters:savedStateobject

Overrides: Control.LoadControlState(object)

C#
protected virtual void LoadControlStateObject(object[] stateArray, int currentStateIndex)
Parameters:stateArrayobject[]currentStateIndexint
C#
protected override void LoadViewState(object savedState)
Parameters:savedStateobject

Overrides: DataBoundControl.LoadViewState(object)

C#
protected override void OnInit(EventArgs e)
Parameters:eEventArgs

Overrides: RadCompositeDataBoundControl.OnInit(EventArgs)

C#
protected override RenderMode PreferredRenderMode(RenderModeBrowserAdaptor browser)
Parameters:browserRenderModeBrowserAdaptorReturns:

RenderMode

Overrides: RadCompositeDataBoundControl.PreferredRenderMode(RenderModeBrowserAdaptor)

Rebinds the ThumbnailsArea.ListView control and recreates all controls required for the RadImageGallery to recreates itself successfully.

C#
public void Rebind()
C#
protected override void Render(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadCompositeDataBoundControl.Render(HtmlTextWriter)

C#
protected override void RenderContents(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadCompositeDataBoundControl.RenderContents(HtmlTextWriter)

C#
protected override object SaveControlState()
Returns:

object

Overrides: Control.SaveControlState()

C#
protected virtual void SaveControlStateObject(IList state)
Parameters:stateIList
C#
protected override object SaveViewState()
Returns:

object

Overrides: DataBoundControl.SaveViewState()

C#
protected override void TrackViewState()

Overrides: DataBoundControl.TrackViewState()

Events

Event is fired when RadImageGallery control fires a command event or by manyally calling the fireCommand client-side method available in the Telerik.Web.UI.RadImageGallery client-side object.

C#
public event EventHandler<ImageGalleryCommandEventArgs> Command

Event is fired when an image ImageGalleryItem needs to retrieve its URL from the server. The event could be subscribed and the ImageUrl (or ImageData) could be specified manually (this will cancel the automatic mechanism).

C#
public event EventHandler<ImageGalleryImageRequestedEventArgs> ImageRequested

The event is raised when a RadImageGallery item and its associated RadListView item are created. The event arguments provide access to both items for further configuration or access to controls.

C#
public event EventHandler<ImageGalleryItemEventArgs> ItemCreated

The event is raised when a RadImageGallery item and its associated RadListView item are data-bound. The event arguments provide access to both items for further configuration or access to controls.

C#
public event EventHandler<ImageGalleryItemEventArgs> ItemDataBound

The event is raised before RadImageGallery is data-bound and its purpose is to specify the DataSource property to which the control will be bound to.

C#
public event EventHandler<ImageGalleryNeedDataSourceEventArgs> NeedDataSource

The event is raised when the RadImageGallery changes its CurrentPageIndex and goes to a different page.

C#
public event EventHandler<ImageGalleryPageIndexChangedEventArgs> PageIndexChanged

The event is raised when the PageSize changes.

C#
public event EventHandler<ImageGalleryPageSizeChangedEventArgs> PageSizeChanged