RadLightBox
RadLightBox control. See the Overview topic for more information.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[ToolboxBitmap(typeof(RadLightBox), "Telerik.Web.UI.LightBox.png")]
[TelerikToolboxCategory("Data")]
[RequiredScript(typeof(Core), 1)]
[RequiredScript(typeof(jQueryPlugins), 2)]
[RequiredScript(typeof(ImageAnimations), 3)]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadLightBox))]
[RequiredScript(typeof(MaterialRipple))]
[ClientScriptResource("Telerik.Web.UI.RadLightBox", "Telerik.Web.UI.LightBox.RadLightBoxScripts.js")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadGrid))]
[EmbeddedSkin("LightBox")]
[EmbeddedSkin("LightBox", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadLightBox))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Mobile, typeof(RadLightBox))]
public class RadLightBox : RadDataBoundControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, IFeatureGroup, INamingContainer, IPostBackEventHandler
Inheritance: objectControlWebControlBaseDataBoundControlDataBoundControlRadDataBoundControlRadLightBox...
Implements:
Inherited Members
Constructors
public RadLightBox()
Fields
public const string NavigateToCommandName = "NavigateTo"
Properties
Gets/sets a value that indicates whether list items are cleared before databinding
public bool AppendDataBoundItems { get; set; }
RadLightBox Client Settings
[TypeConverter(typeof(ExpandableObjectConverter))]
[PersistenceMode(PersistenceMode.InnerProperty)]
public LightBoxClientSettings 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/sets the current item index
public int CurrentItemIndex { get; set; }
The field in the data source which provides the description text.
public string DataDescriptionField { get; set; }
The field in the data source which provides the ImageUrl.
public string DataImageUrlField { get; set; }
This property enables setting a default path for the images when binding
public string DataImageUrlFormatString { get; set; }
The field in the data source which provides the NavigateUrl.
public string DataNavigateUrlField { get; set; }
The field in the data source which provides the target control's ID.
public string DataTargetControlIDField { get; set; }
The field in the data source which provides the title text.
public string DataTitleField { get; set; }
Determines the position of the RadLightBox title/description
public LightBoxDescriptionPosition DescriptionPosition { get; set; }
Determines if the control will have WAI-ARIA support enabled
public bool EnableAriaSupport { get; set; }
Enables or disables the "glow" effect around the control
public bool EnableGlowEffect { get; set; }
RadLightBox Items Collection
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public RadLightBoxItemCollection Items { get; }
Returns the items count
[Browsable(false)]
public int ItemsCount { get; }
Gets/sets the items counter format string. The first parameter is the item index and the second is the total number of items. The second parameter is optional.
public string ItemsCounterFormatString { get; set; }
The container that holds the description
[Browsable(false)]
public PlaceHolder LightBoxDescriptionContainer { get; set; }
The container that holds the main content
[Browsable(false)]
public PlaceHolder LightBoxItemContainer { get; set; }
The container that holds the title
[Browsable(false)]
public PlaceHolder LightBoxTitleContainer { get; set; }
Gets or sets a value indicating where RadLightBox 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/RadLightBoxResources/".
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; }
Determines whether the RadLightBox is modal
[ClientControlProperty]
[Browsable(true)]
[Bindable(true)]
public bool Modal { get; set; }
The default value is false
If set to true, this will prevent disposing of the current item's templates which will avoid the postback when only one template item is available in the items collection and the lightbox is closed and then re-opened. Disabled by default.
public bool PreserveCurrentItemTemplates { get; set; }
See the RadLightBox Templates article for more detail: https://docs.telerik.com/devtools/aspnet-ajax/controls/lightbox/functionality/templates
Determines whether the Close button will be visible
public bool ShowCloseButton { get; set; }
Determines whether the RadLightBox will display loading panel
[Browsable(true)]
[Bindable(false)]
public bool ShowLoadingPanel { get; set; }
The default value is true
Determines whether the Maximize button will be visible
public bool ShowMaximizeButton { get; set; }
Determines whether the Next button will be visible
public bool ShowNextButton { get; set; }
Determines whether the Prev button will be visible
public bool ShowPrevButton { get; set; }
Determines whether the Restore button will be visible
public bool ShowRestoreButton { get; set; }
protected override bool SupportsRenderingMode { get; }
Overrides:
Gets or sets the tab index of the RadLightBox control. Setting this to 0 will prevent the normal operation of the keyboard navigation.
public override short TabIndex { get; set; }
Overrides:
protected override HtmlTextWriterTag TagKey { get; }
Overrides:
Methods
protected override void CreateChildControls()
Overrides:
protected override void DescribeComponent(IScriptDescriptor descriptor)
Overrides:
protected override void LoadControlState(object savedState)
Overrides:
Raises Command event
protected virtual void OnCommand(LightBoxCommandEventArgs e)
protected override void PerformDataBinding(IEnumerable data)
Overrides:
protected override void RenderContents(HtmlTextWriter writer)
Overrides:
protected override void TrackViewState()
Overrides:
Events
RadLightBox Command event
public event EventHandler<LightBoxCommandEventArgs> Command