Click or drag to resize

EAPBootstrapUtils Class

Utility methods for working with different versions of Bootstrap CSS. These utilities are intended to ease support for different versions of Bootstrap using the same code base. The need for this class was driven by the breaking changes introduced in Bootstrap 4 over Bootstrap 3, see https://getbootstrap.com/docs/4.1/migration/ for information about the changes and migration.
Inheritance Hierarchy
SystemObject
  NetQuarryEAPBootstrapUtils

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static class EAPBootstrapUtils

The EAPBootstrapUtils type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddBreadcrumbItemClasses
Adds classes for breadcrumb items appropriate for the version of Bootstrap being used.
Public methodStatic memberAddButtonClasses
Adds the Bootstrap class(es) for a button appropriate for the version of Bootstrap being used.
Public methodStatic memberAddCollapseClasses
Adds the Bootstrap class(es) for collapsable elements and the initial open/collapsed state appropriate for the version of Bootstrap being used.
Public methodStatic memberAddColumnClass
Adds the class for a Bootstrap grid column appropriate for the version of Bootstrap being used. Uses GetColumnClass(IAppContext, BootstrapBreakpoints, Int32) to get the breakpoint class.
Public methodStatic memberAddDropdownClass
Adds the Bootstrap class, appropriate for the version of Bootstrap being used, for a dropdown (i.e. SELECT element/combobox) control.
Public methodStatic memberAddHiddenClass
Adds the Bootstrap class for hiding an HTML element appropriate for the version of Bootstrap being used. Note that the class hides the element by setting the display:none style. Note also that the hidden class in Bootstrap 3 has been replaced by d-none in Bootstrap 4, but to minimize Boostrap version differences the platform ensures that both classes are defined in both environments.
Public methodStatic memberAddNavClass
Adds the Bootstrap class, appropriate for the version of Bootstrap being used, for a navigator. Use AddNavItemClass(IAppContext, Control) to add Bootstrap classes to a navigation element inside the navigator.
Public methodStatic memberAddNavItemClass
Adds the Bootstrap class, appropriate for the version of Bootstrap being used, for a navigation element. Use AddNavClass(IAppContext, Control) to add Bootstrap classes to the containing navigator.
Public methodStatic memberAddNavLinkClass
Adds the Bootstrap class, appropriate for the version of Bootstrap being used, for a link.
Public methodStatic memberAddPanelClasses
Adds the Bootstrap class, appropriate for the version of Bootstrap being used, for a panel/card element (the Bootstrap 3 "panel" concept has been rolled into the Bootstrap 4 card concept).
Public methodStatic memberAddTableClasses
Adds the Bootstrap class(es) for HTML TABLE elements appropriate for the version of Bootstrap being used.
Public methodStatic memberGetBreakpointAbbreviation
Gets the Bootstrap grid column breakpoint abbreviation string for the specified breakpoint appropriate for the version of Bootstrap being used. Note that the BootstrapBreakpoints names correspond roughly with the Bootstrap 4 names. For example BootstrapBreakpoints.Medium will return "md" for Bootstrap 4, but "sm" for Bootstrap 3.
Public methodStatic memberGetColumnClass
Gets the Bootstrap grid column breakpoint class for the specified breakpoint appropriate for the version of Bootstrap being used. Uses GetBreakpointAbbreviation(IAppContext, BootstrapBreakpoints) to get the breakpoint abbreviation. Note that the BootstrapBreakpoints names correspond roughly with the Bootstrap 4 names. For example BootstrapBreakpoints.Medium with a span of 6 will return "col-md-6" for Bootstrap 4, but "col-sm-6" for Bootstrap 3.
Public methodStatic memberGetPanelClass
Gets the Bootstrap class, appropriate for the version of Bootstrap being used, for a panel/card element (the Bootstrap 3 "panel" concept has been rolled into the Bootstrap 4 card concept).
Public methodStatic memberGetThemeClass
Gets the Bootstrap theme class, appropriate for the version of Bootstrap being used, for the specified standard theme and prefix.
Top
See Also