Пример #1
0
 /// <summary>
 /// Builds a list of styles for the responsive container element.
 /// </summary>
 /// <param name="builder">Style builder used to append the classnames.</param>
 protected virtual void BuildContainerStyles(StyleBuilder builder)
 {
     if (FixedHeader && !string.IsNullOrEmpty(FixedHeaderTableHeight))
     {
         builder.Append($"height: {FixedHeaderTableHeight};");
     }
 }
Пример #2
0
 /// <summary>
 /// Builds a list of styles for this component.
 /// </summary>
 /// <param name="builder">Style builder used to append the styles.</param>
 protected virtual void BuildStyles(StyleBuilder builder)
 {
     if (Style != null)
     {
         builder.Append(Style);
     }
 }
Пример #3
0
        protected override void BuildStyles(StyleBuilder builder)
        {
            if (MaxHeight != null)
            {
                builder.Append(StyleProvider.ModalBodyMaxHeight(MaxHeight ?? 0));
            }

            base.BuildStyles(builder);
        }
Пример #4
0
        /// <inheritdoc/>
        protected override void BuildStyles(StyleBuilder builder)
        {
            if (Bar != null)
            {
                builder.Append("display: inline-flex");
            }

            base.BuildStyles(builder);
        }
Пример #5
0
        protected override void BuildStyles(StyleBuilder builder)
        {
            if (Value != null)
            {
                builder.Append(StyleProvider.ProgressBarValue(Value ?? 0));
            }

            base.BuildStyles(builder);
        }
Пример #6
0
        protected virtual void BuildStyles(StyleBuilder builder)
        {
            if (Style != null)
            {
                builder.Append(Style);
            }

            builder.Append(StyleProvider.Visibility(Visibility));
        }
Пример #7
0
        /// <summary>
        /// Builds the styles for a progress bar.
        /// </summary>
        /// <param name="builder">Styles builder used to append the styles.</param>
        private void BuildProgressBarStyles(StyleBuilder builder)
        {
            if (Percentage != null)
            {
                builder.Append(StyleProvider.ProgressBarValue(Percentage ?? 0));
            }

            builder.Append(StyleProvider.ProgressBarSize(ThemeSize));
        }
Пример #8
0
        /// <inheritdoc/>
        protected override void BuildStyles(StyleBuilder builder)
        {
            if (MaxMenuHeight != null)
            {
                builder.Append($"--dropdown-list-menu-max-height: {MaxMenuHeight};");
            }

            base.BuildStyles(builder);
        }
Пример #9
0
        /// <inheritdoc/>
        protected override void BuildStyles(StyleBuilder builder)
        {
            if (Percentage != null)
            {
                builder.Append(StyleProvider.ProgressBarValue(Percentage ?? 0));
            }

            builder.Append(StyleProvider.ProgressBarSize(ParentProgress?.ThemeSize ?? Size.Default));

            base.BuildStyles(builder);
        }
Пример #10
0
        /// <inheritdoc/>
        protected override void BuildStyles(StyleBuilder builder)
        {
            if (Value != null)
            {
                builder.Append(StyleProvider.ProgressBarValue(Value ?? 0));
            }

            builder.Append(StyleProvider.ProgressBarSize(ParentProgress?.Size ?? Size.None));

            base.BuildStyles(builder);
        }
Пример #11
0
        protected override void BuildStyles(StyleBuilder builder)
        {
            base.BuildStyles(builder);

            builder.Append($"padding-left: { Indentation * ( ParentDropdownState.NestedIndex + 1 ) }rem", ParentDropdownState.IsInlineDisplay);
        }
Пример #12
0
        /// <inheritdoc/>
        protected override void BuildStyles(StyleBuilder builder)
        {
            base.BuildStyles(builder);

            builder.Append(FormattableString.Invariant($"padding-left: { Indentation * ( ParentDropdownState.NestedIndex + 1d ) }rem"), ParentDropdownState.IsInlineDisplay);
        }
Пример #13
0
        protected override void BuildStyles(StyleBuilder builder)
        {
            base.BuildStyles(builder);

            builder.Append($"padding-left: { 1.5d * ParentStore.NestedIndex }rem", ParentStore.IsInlineDisplay);
        }
Пример #14
0
 public BaseComponent()
 {
     ClassBuilder = new ClassBuilder(BuildClasses);
     StyleBuilder = new StyleBuilder(BuildStyles);
 }
Пример #15
0
 protected virtual void DirtyStyles()
 {
     StyleBuilder.Dirty();
 }
Пример #16
0
        protected override void BuildStyles(StyleBuilder builder)
        {
            builder.Append(StyleProvider.ModalShow(), Visible);

            base.BuildStyles(builder);
        }
Пример #17
0
        protected override void BuildStyles(StyleBuilder builder)
        {
            builder.Append(StyleProvider.RowGutter(Gutter), Gutter != default);

            base.BuildStyles(builder);
        }