private void SetClassMap() { ClassMapper.Clear().Add("ant-tree-checkbox") .If("ant-tree-checkbox-checked", () => SelfNode.Checked) .If("ant-tree-checkbox-indeterminate", () => SelfNode.Indeterminate) .If("ant-tree-checkbox-disabled", () => SelfNode.Disabled || SelfNode.DisableCheckbox) ; }
private void SetClassMap() { ClassMapper.Clear() .Add("ant-collapse-item") .If("ant-collapse-no-arrow", () => !this.ShowArrow) .If("ant-collapse-item-active", () => this.Active) .If("ant-collapse-item-disabled", () => this.Disabled); }
protected void SetClass() { var clsPrefix = "ant-rate"; ClassMapper.Clear() .Add(clsPrefix) .If("ant-rate-disabled", () => Disabled); }
private void SetClass() { ClassMapper.Clear() .Add(PrefixCls) .If($"{PrefixCls}-lg", () => Size == InputSize.Large) .If($"{PrefixCls}-sm", () => Size == InputSize.Small) .If($"{PrefixCls}-disabled", () => this.Disabled); }
private void SetClassMapper() { ClassMapper.Clear().Add("ant-tree") .If("ant-tree-show-line", () => ShowLine) .If("ant-tree-icon-hide", () => ShowIcon) .If("ant-tree-block-node", () => BlockNode) .If("draggable-tree", () => Draggable); }
private void SetClassMap() { ClassMapper.Clear().Add("ant-select-item").Add("ant-select-item-option") //.If("ant-select-item-option-grouped", () => this.AutocompleteOptgroup) .If("ant-select-item-option-selected", () => CalcSelected()) .If("ant-select-item-option-active", () => CalcActive()) .If("ant-select-item-option-disabled", () => this.Disabled); }
protected void SetClassMap() { string prefixName = "ant-typography"; ClassMapper.Clear() .Add("ant-typography") .If($"{prefixName}-{Type}", () => !string.IsNullOrEmpty(Type)) .If($"{prefixName}-disabled", () => Disabled); }
protected override void OnParametersSet() { base.OnParametersSet(); ClassMapper.Clear() .Add($"{PreFixCls}-slide") .If($"{PreFixCls}-active", () => Active) .If($"{PreFixCls}-current", () => Active); }
protected override void OnParametersSet() { base.OnParametersSet(); _classMapper.Clear(). Add(PrefixCls) .If($"{PrefixCls}-active", () => IsActive) .If($"{PrefixCls}-disabled", () => Disabled); }
protected void SetClass() { var clsPrefix = "ant-rate"; ClassMapper.Clear() .Add(clsPrefix) .If($"{clsPrefix}-disabled", () => Disabled) .If($"{clsPrefix}-rtl", () => RTL); }
protected override void OnInitialized() { base.OnInitialized(); ClassMapper.Clear() .Add(PREFIX_CLS) .If($"{PREFIX_CLS}-icon-hide", () => !ShowIcon) .If($"{PREFIX_CLS}-show-line", () => ShowLine) ; }
private void SetClassMap() { ClassMapper.Clear() .Add(_prefixCls) .If($"{_prefixCls}-{this._sizeMap[this.Size]}", () => _sizeMap.ContainsKey(Size)) .If($"{_prefixCls}-{this.Shape}", () => !string.IsNullOrEmpty(Shape)) .If($"{_prefixCls}-icon", () => !string.IsNullOrEmpty(Icon)) .If($"{_prefixCls}-image", () => _hasSrc) ; }
protected void SetClass() { ClassMapper.Clear() .Add(_prefixCls) .If($"{_prefixCls}-checked", () => CurrentValue) .If($"{_prefixCls}-disabled", () => Disabled || Loading) .If($"{_prefixCls}-loading", () => Loading) .If($"{_prefixCls}-small", () => Size == "small") .If($"{_prefixCls}-rtl", () => RTL); }
protected override void OnInitialized() { base.OnInitialized(); ClassMapper.Clear() .Add(PrefixCls) .If($"{PrefixCls}-lg", () => Size == InputSize.Large) .If($"{PrefixCls}-sm", () => Size == InputSize.Small) .If($"{PrefixCls}-compact", () => Compact); }
private void SetClass() { SlickSliderClassMapper.Clear() .Add("slick-slider slick-initialized") .If("slick-vertical", () => !IsHorizontal); ClassMapper.Clear() .Add(PrefixCls) .If($"{PrefixCls}-vertical", () => !IsHorizontal); }
private void SetClass() { SlickSliderClassMapper.Add("slick-slider slick-initialized") .If("slick-vertical", () => DotPosition.IsIn(CarouselDotPosition.Left, CarouselDotPosition.Right)) ; ClassMapper.Clear() .Add(PrefixCls) .If($"{PrefixCls}-vertical", () => DotPosition.IsIn(CarouselDotPosition.Left, CarouselDotPosition.Right)); }
protected void SetClass() { string prefixName = "ant-checkbox"; ClassMapper.Clear() .Add(prefixName) .If($"{prefixName}-checked", () => Checked && !Indeterminate) .If($"{prefixName}-disabled", () => Disabled) .If($"{prefixName}-indeterminate", () => Indeterminate); }
protected override void OnInitialized() { base.OnInitialized(); ClassMapper.Clear() .Add(PrefixCls) .If($"{PrefixCls}-lg", () => Size == InputSize.Large) .If($"{PrefixCls}-sm", () => Size == InputSize.Small) .If($"{PrefixCls}-compact", () => Attributes != null && Attributes.ContainsKey("compact")); }
protected void SetClassMap() { ClassMapper.Clear() .Add("ant-select-item") .Add(ClassPrefix) .If($"{ClassPrefix}-disabled", () => Disabled) .If($"{ClassPrefix}-selected", () => IsSelected) .If($"{ClassPrefix}-active", () => _isActive) .If($"{ClassPrefix}-grouped", () => SelectOptGroupParent != null) .If(ClassName, () => !string.IsNullOrWhiteSpace(ClassName)); }
private void SetClasses() { ClassMapper.Clear() .Add(PrefixCls) .Add($"{PrefixCls}-{Size.Name}") .If($"{PrefixCls}-{Type.Name}", () => Type != ProgressType.Dashboard) .If($"{PrefixCls}-{ProgressType.Circle.Name}", () => Type == ProgressType.Dashboard) .If($"{PrefixCls}-status-{Status.Name}", () => Status != null) .If($"{PrefixCls}-show-info", () => ShowInfo) .If($"{PrefixCls}-steps", () => Steps > 0); }
private void SetClass() { ClassMapper.Clear() .Add("ant-divider") .Get(() => $"ant-divider-{this.Type.ToLowerInvariant()}") .If("ant-divider-with-text", () => Text != null || ChildContent != null) .GetIf(() => $"ant-divider-with-text-{this.Orientation.ToLowerInvariant()}", () => Text != null || ChildContent != null) .If($"ant-divider-plain", () => Plain && (Text != null || ChildContent != null)) .If("ant-divider-dashed", () => Dashed) ; }
/// <summary> /// Sets the default CSS classes. /// </summary> private void SetClassMap() { var prefixName = "ant-ribbon"; ClassMapper.Clear() .Add(prefixName) .Add($"{prefixName}-placement-{Placement}") .If($"{prefixName}-rtl", () => RTL) .If($"{prefixName}-color-{PresetColor}", () => Color.IsIn(_badgePresetColors)) ; }
protected void SetClassMap() { var prefix = "ant-timeline"; ClassMapper.Clear() .Add(prefix) .If($"{prefix}-right", () => Mode == "right") .If($"{prefix}-alternate", () => Mode == "alternate") .If($"{prefix}-pending", () => Pending != null) .If($"{prefix}-reverse", () => Reverse); }
/// <summary> /// Sets the default CSS classes. /// </summary> private void SetClassMap() { var prefixName = "ant-ribbon"; ClassMapper.Clear() .Add(prefixName) .Add($"{prefixName}-placement-{Placement}") //.If($"{prefixName}-rtl", () => Direction == "RTL" # Placeholder for when RTL support is added .If($"{prefixName}-color-{PresetColor}", () => Color.IsIn(_badgePresetColors)) ; }
protected override Task OnParametersSetAsync() { ClassMapper.Clear() .Add(_prefixCls) .If($"{_prefixCls}-checked", () => _isChecked) .If($"{_prefixCls}-disabled", () => Disabled || Loading) .If($"{_prefixCls}-loading", () => Loading) .If($"{_prefixCls}-small", () => Size.Equals("small")) ; return(base.OnParametersSetAsync()); }
protected void SetClass() { ClassMapperLabel.Clear() .Add($"{_prefixCls}-wrapper") .If($"{_prefixCls}-wrapper-checked", () => Checked); ClassMapper.Clear() .Add(_prefixCls) .If($"{_prefixCls}-checked", () => Checked && !Indeterminate) .If($"{_prefixCls}-disabled", () => Disabled) .If($"{_prefixCls}-indeterminate", () => Indeterminate) .If($"{_prefixCls}-rtl", () => RTL); }
protected virtual void SetClasses() { AffixWrapperClass = $"{PrefixCls}-affix-wrapper {(IsFocused ? $"{PrefixCls}-affix-wrapper-focused" : "")}"; GroupWrapperClass = $"{PrefixCls}-group-wrapper"; if (!string.IsNullOrWhiteSpace(Class)) { AffixWrapperClass = string.Join(" ", Class, AffixWrapperClass); ClassMapper.OriginalClass = ""; } ClassMapper.Clear() .Add($"{PrefixCls}") .If($"{PrefixCls}-lg", () => Size == InputSize.Large) .If($"{PrefixCls}-sm", () => Size == InputSize.Small) .If($"{PrefixCls}-rtl", () => RTL) ; Attributes ??= new Dictionary <string, object>(); if (MaxLength >= 0 && !Attributes.ContainsKey("maxlength")) { Attributes?.Add("maxlength", MaxLength); } if (Disabled) { // TODO: disable element AffixWrapperClass = string.Join(" ", AffixWrapperClass, $"{PrefixCls}-affix-wrapper-disabled"); ClassMapper.Add($"{PrefixCls}-disabled"); } if (AllowClear) { _allowClear = true; //ClearIconClass = $"{PrefixCls}-clear-icon"; ToggleClearBtn(); } if (Size == InputSize.Large) { AffixWrapperClass = string.Join(" ", AffixWrapperClass, $"{PrefixCls}-affix-wrapper-lg"); GroupWrapperClass = string.Join(" ", GroupWrapperClass, $"{PrefixCls}-group-wrapper-lg"); } else if (Size == InputSize.Small) { AffixWrapperClass = string.Join(" ", AffixWrapperClass, $"{PrefixCls}-affix-wrapper-sm"); GroupWrapperClass = string.Join(" ", GroupWrapperClass, $"{PrefixCls}-group-wrapper-sm"); } }
/// <summary> /// Sets the default classes. /// </summary> private void SetClassMap() { string prefixName = "ant-alert"; ClassMapper.Clear() .Add("ant-alert") .If($"{prefixName}-{Type}", () => !string.IsNullOrEmpty(Type)) .If($"{prefixName}-no-icon", () => !ShowIcon) .If($"{prefixName}-closable", () => Closable) .If($"{prefixName}-banner", () => Banner) .If($"{prefixName}-with-description", () => !string.IsNullOrEmpty(Description)) .If($"{prefixName}-slide-up-leave", () => _isClosing) ; }
protected override void OnInitialized() { base.OnInitialized(); this.CurrentValue = this.CurrentValue ? this.CurrentValue : this.Checked; ClassMapper.Clear() .Add(_prefixCls) .If($"{_prefixCls}-checked", () => CurrentValue) .If($"{_prefixCls}-disabled", () => Disabled || Loading) .If($"{_prefixCls}-loading", () => Loading) .If($"{_prefixCls}-small", () => Size == "small") ; }
internal void SetClassMap() { var prefix = "ant-timeline-item"; ClassMapper.Clear().Add(prefix) .If($"{prefix}-right", () => Position == "right") .If($"{prefix}-left", () => Position == "left") .If($"{prefix}-last", () => IsLast); var headPrefix = "ant-timeline-item-head"; _headClassMapper.Clear().Add(headPrefix) .If($"{headPrefix}-{Color}", () => _defaultColors.Contains(Color)) .If($"{headPrefix}-custom", () => Dot != null); }