Beispiel #1
0
        /// <summary>
        /// 设置子元素
        /// </summary>
        protected override void SetChildElements()
        {
            IonSlides control = this.ControlHost.Content as IonSlides;

            foreach (var c in this.ControlHost.Children)
            {
                this.HtmlWriter.RenderBeginTag("wm-slide");
                var builder = c.GetBuilder(this.IsPreview, this.ScreenDefinition, this.Compile, this.ProjectDocument, this.PermissionData, this.HtmlWriter);
                builder.Parent = this;
                builder.Build();
                this.HtmlWriter.RenderEndTag();
            }
        }
Beispiel #2
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonSlides control = this.ControlHost.Content as IonSlides;

            if (control.Pager)
            {
                this.HtmlWriter.AddAttribute("pager", "");
            }
            if (control.Autoplay != null && control.Autoplay > 0)
            {
                this.HtmlWriter.AddAttribute("autoplay", control.Autoplay.ToString());
            }
            if (control.Loop)
            {
                this.HtmlWriter.AddAttribute("loop", "true");
            }
            this.HtmlWriter.AddAttribute("zoom", "true");

            base.SetAttributes();
        }