Hi,
How can i add dynamic templated items to ImageGallery?
I define a template:
class ImageGalleryContentTemplate : ITemplate{ public String BackgroundImage { get; set; } public String HTMLTemplate { get; set; } public void InstantiateIn(Control container) { String strC = ""; if (BackgroundImage != "") strC = String.Format("<div style=\"background-image: url({0})\">{1}</div>", BackgroundImage, HTMLTemplate); else strC = HTMLTemplate; container.Controls.Add(new LiteralControl(strC)); }}I tried to use it following way:
ImageGalleryTemplateItem igti = new ImageGalleryTemplateItem();ImageGalleryContentTemplate template = new ImageGalleryContentTemplate();template.BackgroundImage = strBigImgUrl;template.HTMLTemplate = strTemplate;template.InstantiateIn(igti);
template.InstantiateIn doesn't accept ImageGalleryTemplateItem and if i use InstantiateIn(ImageGalleryTemplateItem container) instead of InstantiateIn(Control container), i don't use container.Controls.Add(...), because ImageGalleryTemplateItem hasn't .Controls() property.
if I use igti.ContentTemplate = template instead of template.InstantiateIn(igti) project running without errors, but other slides than first not showing.
Please look at this page: http://v2.gom.com.tr/anasayfa
Just below the menu;
- First slider done with RadRotator. Customer wants selector dots and seamless animation.
- Second slider with RadImageGallery, which has this problem (running with igti.ContentTemplate = template).
- Third slider with RadImageGallery, but has only images and working perfectly. But customer wants texts and link button.
How can i add dynamic templated items to ImageGallery OR how to handle it with RadRotator?