Ejemplo n.º 1
0
        /// <summary>
        /// Configures the effects of the panelbar.
        /// </summary>
        /// <param name="effectsAction">The action which configures the effects.</param>
        /// <example>
        /// <code lang="CS">
        /// &lt;%= Html.Telerik().PanelBar()
        ///	           .Name("PanelBar")
        ///	           .Effects(fx =>
        ///	           {
        ///		            fx.Height()
        ///			          .Opacity()
        ///					  .OpenDuration(AnimationDuration.Normal)
        ///					  .CloseDuration(AnimationDuration.Normal);
        ///	           })
        /// </code>
        /// </example>
        public PanelBarBuilder Effects(Action <EffectsBuilder> addEffects)
        {
            Guard.IsNotNull(addEffects, "addAction");

            EffectsBuilderFactory factory = new EffectsBuilderFactory();

            addEffects(factory.Create(Component.Effects));

            return(this);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Configures the effects of the menu.
        /// </summary>
        /// <param name="effectsAction">The action which configures the effects.</param>
        /// <example>
        /// <code lang="CS">
        /// &lt;%= Html.Telerik().Menu()
        ///	           .Name("Menu")
        ///	           .Effects(fx =>
        ///	           {
        ///		            fx.Slide()
        ///			          .Opacity()
        ///					  .OpenDuration(AnimationDuration.Normal)
        ///					  .CloseDuration(AnimationDuration.Normal);
        ///	           })
        /// </code>
        /// </example>
        public MenuBuilder Effects(Action <EffectsBuilder> addEffects)
        {
            Guard.IsNotNull(addEffects, "addAction");

            EffectsBuilderFactory factory = new EffectsBuilderFactory();

            addEffects(factory.Create(Component.Effects));

            if (Component.Effects.Container.Count == 0)
            {
                factory.Create(Component.Effects).Slide();
            }

            return(this);
        }