protected override void RegisterClasses() { ClassMapper .Add(() => ClassProvider.Nav()) .If(() => ClassProvider.NavTabs(), () => IsTabs) .If(() => ClassProvider.NavCards(), () => IsCards) .If(() => ClassProvider.NavPills(), () => IsPills) .If(() => ClassProvider.NavVertical(), () => IsVertical) .If(() => ClassProvider.NavFill(Fill), () => Fill != NavFillType.None); base.RegisterClasses(); }
protected override void RegisterClasses() { ClassMapper .Add(() => ClassProvider.Table()) .If(() => ClassProvider.TableFullWidth(), () => IsFullWidth) .If(() => ClassProvider.TableStriped(), () => IsStriped) .If(() => ClassProvider.TableBordered(), () => IsBordered) .If(() => ClassProvider.TableHoverable(), () => IsHoverable) .If(() => ClassProvider.TableNarrow(), () => IsNarrow) .If(() => ClassProvider.TableBorderless(), () => IsBorderless); base.RegisterClasses(); }
protected override void RegisterClasses() { ClassMapper .Add(() => ClassProvider.Button()) .If(() => ClassProvider.ButtonColor(Color), () => Color != Color.None && !IsOutline) .If(() => ClassProvider.ButtonOutline(Color), () => Color != Color.None && IsOutline) .If(() => ClassProvider.ButtonSize(Size), () => Size != ButtonSize.None) .If(() => ClassProvider.ButtonBlock(), () => IsBlock) .If(() => ClassProvider.ButtonActive(), () => IsActive) .If(() => ClassProvider.ButtonLoading(), () => IsLoading); AddonContainerClassMapper .If(() => ClassProvider.AddonContainer(), () => IsAddons); base.RegisterClasses(); }
private IFluentSpacingWithSize WithSize(string value) { if (customRules == null) { customRules = new List <string> { value } } ; else { customRules.Add(value); } ClassMapper.Dirty(); return(this); }
private void HandleOpenState(bool isOpen) { if (modalBackdrop != null) { modalBackdrop.IsOpen = isOpen; } // TODO: find a way to remove javascript if (isOpen) { JSRunner.AddClassToBody("modal-open"); } else { JSRunner.RemoveClassFromBody("modal-open"); } ClassMapper.Dirty(); StyleMapper.Dirty(); }
public void SelectPanel(string panelName) { if (lastSelectePanel != panelName) { lastSelectePanel = panelName; foreach (var child in childPanels) { child.IsActive = child.Name == panelName; } // raise the panelchanged notification SelectedPanelChanged?.Invoke(panelName); // although nothing is actually changed we need to call this anyways or otherwise the rendering will not be called ClassMapper.Dirty(); StateHasChanged(); } }
/// <summary> /// Sets the active tab by the name. /// </summary> /// <param name="tabName"></param> public void SelectTab(string tabName) { if (lastSelectedTab != tabName) { lastSelectedTab = tabName; foreach (var child in childTabs) { child.IsActive = child.Name == tabName; } // raise the tabchanged notification SelectedTabChanged?.Invoke(tabName); // although nothing is actually changed we need to call this anyways or otherwise the rendering will not be called ClassMapper.Dirty(); StateHasChanged(); } }
public IFluentSpacingOnBreakpointWithSideAndSize WithSize(SpacingSize spacingSize) { var spacingDefinition = new SpacingDefinition { Breakpoint = Breakpoint.None, Side = Side.All }; if (!rules.ContainsKey(spacingSize)) { rules.Add(spacingSize, new List <SpacingDefinition>() { spacingDefinition }); } else { rules[spacingSize].Add(spacingDefinition); } currentSpacing = spacingDefinition; ClassMapper.Dirty(); return(this); }
private IFluentColumnOnBreakpointWithOffsetAndSize WithColumnSize(ColumnWidth columnSize) { var columnDefinition = new ColumnDefinition { Breakpoint = Breakpoint.None }; if (!rules.ContainsKey(columnSize)) { rules.Add(columnSize, new List <ColumnDefinition> { columnDefinition }); } else { rules[columnSize].Add(columnDefinition); } currentColumn = columnDefinition; ClassMapper.Dirty(); return(this); }
/// <summary> /// Registers a child button reference. /// </summary> /// <param name="button">Button to register.</param> internal void Register(BaseButton button) { if (button == null) { return; } if (registeredButtons == null) { registeredButtons = new List <BaseButton>(); } if (!registeredButtons.Contains(button)) { registeredButtons.Add(button); ClassMapper.Dirty(); if (registeredButtons?.Count >= 1) // must find a better way to refresh dropdown { StateHasChanged(); } } }
private void OnValidated(ValidatedEventArgs e) { ClassMapper.Dirty(); }
internal void MenuChanged() { ClassMapper.Dirty(); StateHasChanged(); }