private void SetClass() { ClassMapper.Add(PrefixCls) .Add($"{PrefixCls}-root") .Add($"{PrefixCls}-{Theme}") .Add($"{PrefixCls}-{InternalMode}") .If($"{PrefixCls}-inline-collapsed", () => _collapsed) .If($"{PrefixCls}-unselectable", () => !Selectable); }
public void setClassSet() { string prefixName = "anticon"; ClassMapper.Add(prefixName) .If($"{prefixName}-spin", () => spin || this.type == "loading"); SvgStyle = $"focusable=\"false\" width=\"{width}\" height=\"{height}\" fill=\"{fill}\""; }
private void SetClassMap() { string prefixName = isInDropDown ? "ant-dropdown-menu" : "ant-menu"; ClassMapper.Add(prefixName) .Add($"{prefixName}-root") .Add($"{prefixName}-{theme}") .Add($"{prefixName}-{mode}") .If($"{prefixName}-inline-collapsed", () => inlineCollapsed); }
private void SetClassMap() { var prefixName = IsInDropDown ? "ant-dropdown-menu" : "ant-menu"; ClassMapper.Add(prefixName) .Add($"{prefixName}-root") .Add($"{prefixName}-{Theme}") .Add($"{prefixName}-{Mode}") .If($"{prefixName}-inline-collapsed", () => InlineCollapsed); }
private void SetClass() { var clsPrefix = "ant-pagination"; ClassMapper .Add(clsPrefix) .If($"{clsPrefix}-simple", () => Simple) .If($"{clsPrefix}-disabled", () => Disabled) .If($"mini", () => !Simple && Size == "small") ; }
private void SetClass() { var prefixCls = "ant-layout-sider"; ClassMapper.Add(prefixCls) .If($"{prefixCls}-zero-width", () => Collapsed && CollapsedWidth == 0) .If($"{prefixCls}-light", () => Theme == "light") .If($"{prefixCls}-collapsed", () => Collapsed) .If($"{prefixCls}-has-trigger", () => IsSiderTrigger) ; }
private void SetClass() { WrapperClassMapper .If(WrapperClassName, () => !string.IsNullOrWhiteSpace(WrapperClassName)) .If($"{PrefixCls}-nested-loading", () => !Simple); ClassMapper.Add(PrefixCls) .If($"{PrefixCls}-spinning", () => _isLoading) .If($"{PrefixCls}-lg", () => Size == "large") .If($"{PrefixCls}-sm", () => Size == "small") .If($"{PrefixCls}-show-text", () => string.IsNullOrWhiteSpace(Tip)); }
private void SetClass() { ClassMapper.Add(PrefixCls) .Add($"{PrefixCls}-{RootMenu.InternalMode}") .If($"{PrefixCls}-open", () => IsOpen); SubMenuMapper.Add("ant-menu") .Add("ant-menu-sub") .Add($"ant-menu-{(RootMenu.InternalMode == AntMenuMode.Horizontal ? AntMenuMode.Vertical : RootMenu.InternalMode)}") .If($"ant-menu-submenu-popup", () => RootMenu.InternalMode != AntMenuMode.Inline) .If($"ant-menu-disabled", () => Disabled) .If($"ant-menu-hidden", () => !IsOpen); }
protected virtual void SetClasses() { ClassMapper.Clear() .If($"{PrefixCls}", () => type != "number") .If($"{PrefixCls}-lg", () => size == AntInputSize.Large) .If($"{PrefixCls}-sm", () => size == AntInputSize.Small); if (Attributes is null) { Attributes = new System.Collections.Generic.Dictionary <string, object>(); } _affixWrapperClass = $"{PrefixCls}-affix-wrapper"; _groupWrapperClass = $"{PrefixCls}-group-wrapper"; if (maxLength >= 0) { Attributes?.Add("maxlength", maxLength); } if (Attributes.ContainsKey("disabled")) { // TODO: disable element _affixWrapperClass = string.Join(" ", _affixWrapperClass, $"{PrefixCls}-affix-wrapper-disabled"); ClassMapper.Add($"{PrefixCls}-disabled"); } if (Attributes.ContainsKey("allowClear")) { _allowClear = true; _clearIconClass = $"{PrefixCls}-clear-icon"; ToggleClearBtn(); } if (size == AntInputSize.Large) { _affixWrapperClass = string.Join(" ", _affixWrapperClass, $"{PrefixCls}-affix-wrapper-lg"); _groupWrapperClass = string.Join(" ", _groupWrapperClass, $"{PrefixCls}-group-wrapper-lg"); } else if (size == AntInputSize.Small) { _affixWrapperClass = string.Join(" ", _affixWrapperClass, $"{PrefixCls}-affix-wrapper-sm"); _groupWrapperClass = string.Join(" ", _groupWrapperClass, $"{PrefixCls}-group-wrapper-sm"); } }
protected virtual void SetClasses() { ClassMapper.Clear() .If($"{PrefixCls}", () => Type != "number") .If($"{PrefixCls}-lg", () => Size == InputSize.Large) .If($"{PrefixCls}-sm", () => Size == InputSize.Small); if (Attributes is null) { Attributes = new Dictionary <string, object>(); } AffixWrapperClass = $"{PrefixCls}-affix-wrapper"; GroupWrapperClass = $"{PrefixCls}-group-wrapper"; if (MaxLength >= 0) { 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"); } }
protected override void OnInitialized() { ClassMapper.Add($"{RootMenu.PrefixCls}-item-group"); }
protected override void OnInitialized() { ClassMapper.Add(_prefixCls); }
public CheckboxGroup() { ClassMapper.Add("ant-checkbox-group"); }
public AntCheckboxGroupBase() { ClassMapper.Add("ant-checkbox-group"); }