RadImageGallery
RadImageGallery control. See RadImageGallery Overview topic for more information.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[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:
Inherited Members
Constructors
public RadImageGallery()
Fields
Change Item Index command name constant
public const string ChangeItemIndexCommandName = "ChangeItemIndex"
Change Page Size command name constant
public const string ChangePageSizeCommandName = "ChangePageSize"
First Page command name constant
public const string FirstPageCommandArgument = "First"
Last Page command name constant
public const string LastPageCommandArgument = "Last"
Next Page command name constant
public const string NextPageCommandArgument = "Next"
Page command name constant
public const string PageCommandName = "Page"
Prev Page command name constant
public const string PrevPageCommandArgument = "Prev"
RebindImageGallery command constant
public const string RebindImageGalleryCommandName = "RebindImageGallery"
Properties
Gets or sets a value indicating whether the automatic paging feature is enabled.
public bool AllowPaging { get; set; }
Gets or sets a value that indicates whether Items collection is cleared before DataBinding.
public bool AppendDataBoundItems { get; set; }
Gets or sets the ID of the ClientDataSource control which is used for client-side databinding scenarios.
public string ClientDataSourceID { get; set; }
Gets the settings associated with the RadImageGallery Toolbar.
[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()
protected override string CssClassFormatString { get; }
Overrides:
Gets or sets the selected culture. Localization strings will be loaded based on this value.
public CultureInfo Culture { get; set; }
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.
public int CurrentItemIndex { get; set; }
Gets or sets an integer value representing the current page index.
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.
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.
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.
[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.
public override object DataSource { get; set; }
An object that represents the data source from which the data-bound control retrieves its data. The default is null.
Overrides:
Gets or sets the ID of the control from which the data-bound control retrieves its list of data items.
public override string DataSourceID { get; set; }
The ID of a control that represents the data source from which the data-bound control retrieves its data.
Overrides:
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.
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.
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.
public ImageGalleryDisplayAreaMode DisplayAreaMode { get; set; }
Determines if the control will have WAI-ARIA support enabled
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.
public override bool EnableEmbeddedBaseStylesheet { get; set; }
Overrides:
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.
public override bool EnableEmbeddedScripts { get; set; }
Overrides:
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.
public override bool EnableEmbeddedSkins { get; set; }
Overrides:
If EnableEmbeddedSkins is set to false you will have to register the needed CSS files by hand.
Gets the settings for the RadImageGallery ImageArea.
[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.
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.
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryItemCollection Items { get; }
Gets a reference to the RadLightBox control used when DisplayAreaMode is equal to 'LightBox'.
[Browsable(false)]
public RadLightBox LightBox { get; }
Gets the RadAjaxLoadingPanel control that will be displayed when waiting for the image
[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.
public string LocalizationPath { get; set; }
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.
public bool LoopItems { get; set; }
Gets a reference to the ImageGalleryPagerStyle, which holds properties for controlling the behavior of the RadImageGallery pager item.
[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.
public int PageSize { get; set; }
Note that the AllowPaging should be set to 'true' in order for the property to take effect.
[Browsable(false)]
public RadToolTip RadToolTip { get; }
Determines if the RadImageGallery control will display loading panel when image is being loaded.
public bool ShowLoadingPanel { get; set; }
Gets or sets the skin name for the control user interface.
public override string Skin { get; set; }
A string containing the skin name for the control user interface. The default is string.Empty.
Overrides:
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.
protected override bool SupportsRenderingMode { get; }
Overrides:
protected override HtmlTextWriterTag TagKey { get; }
Overrides:
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.
[Browsable(false)]
public RadListView ThumbnailListView { get; }
Gets the settings for the RadImageGallery ThumbnailArea.
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryThumbnailsAreaSettings ThumbnailsAreaSettings { get; }
Gets the settings associated with the RadImageGallery Toolbar.
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ImageGalleryToolbarSettings ToolbarSettings { get; }
Methods
protected override void AddAttributesToRender(HtmlTextWriter writer)
Overrides:
protected override void CreateChildControls()
Overrides:
protected override int CreateChildControls(IEnumerable dataSource, bool dataBinding)
Overrides:
protected override void DescribeClientEvents(IScriptDescriptor descriptor)
Overrides:
protected override void DescribeClientProperties(IScriptDescriptor descriptor)
Overrides:
Loads the client state data
protected override bool LoadClientState(Dictionary<string, object> clientState)
Overrides:
protected override void LoadControlState(object savedState)
Overrides:
protected override RenderMode PreferredRenderMode(RenderModeBrowserAdaptor browser)
Overrides:
Rebinds the ThumbnailsArea.ListView control and recreates all controls required for the RadImageGallery to recreates itself successfully.
public void Rebind()
protected override void RenderContents(HtmlTextWriter writer)
Overrides:
protected override void TrackViewState()
Overrides:
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.
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).
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.
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.
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.
public event EventHandler<ImageGalleryNeedDataSourceEventArgs> NeedDataSource
The event is raised when the RadImageGallery changes its CurrentPageIndex and goes to a different page.
public event EventHandler<ImageGalleryPageIndexChangedEventArgs> PageIndexChanged
The event is raised when the PageSize changes.
public event EventHandler<ImageGalleryPageSizeChangedEventArgs> PageSizeChanged