├── .gitattributes ├── .github └── workflows │ └── vale.yml ├── .gitignore ├── CODEOWNERS ├── CS └── switcher │ ├── switcher.sln │ └── switcher │ ├── App.razor │ ├── Data │ ├── WeatherForecast.cs │ └── WeatherForecastService.cs │ ├── Layout │ ├── MainLayout.razor │ ├── MainLayout.razor.css │ ├── NavMenu.razor │ └── NavMenu.razor.css │ ├── NOTICE.txt │ ├── Pages │ ├── Counter.razor │ ├── Counter.razor.css │ ├── Index.razor │ ├── Index.razor.css │ └── Weather.razor │ ├── Program.cs │ ├── Routes.razor │ ├── ThemeSwitcher │ ├── Theme.cs │ ├── ThemeJsChangeDispatcher.cs │ ├── ThemeService.cs │ ├── ThemeSwitcher.razor │ ├── ThemeSwitcherContainer.razor │ └── ThemeSwitcherItem.razor │ ├── _Imports.razor │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── switcher.csproj │ └── wwwroot │ ├── css │ ├── bootstrap │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── open.iconic │ │ ├── FONT-LICENSE.txt │ │ ├── ICON-LICENSE.txt │ │ ├── README.md │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ └── site.css │ ├── favicon.ico │ ├── images │ ├── back.svg │ ├── cards.svg │ ├── close.svg │ ├── counter.svg │ ├── demos.svg │ ├── doc.svg │ ├── home.svg │ ├── logo.svg │ ├── menu.svg │ └── weather.svg │ └── switcher-resources │ ├── css │ ├── theme-switcher.css │ ├── themes.css │ └── themes │ │ ├── cerulean │ │ └── bootstrap.min.css │ │ ├── cyborg │ │ └── bootstrap.min.css │ │ ├── default │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ │ ├── flatly │ │ └── bootstrap.min.css │ │ ├── journal │ │ └── bootstrap.min.css │ │ ├── litera │ │ └── bootstrap.min.css │ │ ├── lumen │ │ └── bootstrap.min.css │ │ ├── lux │ │ └── bootstrap.min.css │ │ ├── pulse │ │ └── bootstrap.min.css │ │ ├── simplex │ │ └── bootstrap.min.css │ │ ├── solar │ │ └── bootstrap.min.css │ │ ├── superhero │ │ └── bootstrap.min.css │ │ ├── united │ │ └── bootstrap.min.css │ │ └── yeti │ │ └── bootstrap.min.css │ ├── theme-controller.js │ └── theme.svg ├── LICENSE ├── Readme.md ├── config.json └── images └── blazor-theme-switcher.png /.gitattributes: -------------------------------------------------------------------------------- 1 | VB/* linguist-vendored 2 | scripts linguist-vendored 3 | *.css linguist-detectable=false 4 | *.aff linguist-detectable=false 5 | -------------------------------------------------------------------------------- /.github/workflows/vale.yml: -------------------------------------------------------------------------------- 1 | name: vale-validation 2 | on: 3 | pull_request: 4 | paths: 5 | - README.md 6 | - readme.md 7 | - Readme.md 8 | 9 | jobs: 10 | vale: 11 | name: runner / vale 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: clone repo 15 | uses: actions/checkout@v4 16 | - name: clone vale-styles repo 17 | uses: actions/checkout@v4 18 | with: 19 | repository: DevExpress/vale-styles 20 | path: vale-styles 21 | ssh-key: ${{ secrets.VALE_STYLES_ACCESS_KEY }} 22 | - name: copy vale rules to the root repo 23 | run: shopt -s dotglob && cp -r ./vale-styles/vale/* . 24 | - name: vale linter check 25 | uses: DevExpress/vale-action@reviewdog 26 | with: 27 | files: '["README.md", "readme.md", "Readme.md"]' 28 | fail_on_error: true 29 | filter_mode: nofilter 30 | reporter: github-check 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # Benchmark Results 46 | BenchmarkDotNet.Artifacts/ 47 | 48 | # .NET Core 49 | project.lock.json 50 | project.fragment.lock.json 51 | artifacts/ 52 | **/Properties/launchSettings.json 53 | 54 | *_i.c 55 | *_p.c 56 | *_i.h 57 | *.ilk 58 | *.meta 59 | *.obj 60 | *.pch 61 | *.pdb 62 | *.pgc 63 | *.pgd 64 | *.rsp 65 | *.sbr 66 | *.tlb 67 | *.tli 68 | *.tlh 69 | *.tmp 70 | *.tmp_proj 71 | *.log 72 | *.vspscc 73 | *.vssscc 74 | .builds 75 | *.pidb 76 | *.svclog 77 | *.scc 78 | 79 | # Chutzpah Test files 80 | _Chutzpah* 81 | 82 | # Visual C++ cache files 83 | ipch/ 84 | *.aps 85 | *.ncb 86 | *.opendb 87 | *.opensdf 88 | *.sdf 89 | *.cachefile 90 | *.VC.db 91 | *.VC.VC.opendb 92 | 93 | # Visual Studio profiler 94 | *.psess 95 | *.vsp 96 | *.vspx 97 | *.sap 98 | 99 | # TFS 2012 Local Workspace 100 | $tf/ 101 | 102 | # Guidance Automation Toolkit 103 | *.gpState 104 | 105 | # ReSharper is a .NET coding add-in 106 | _ReSharper*/ 107 | *.[Rr]e[Ss]harper 108 | *.DotSettings.user 109 | 110 | # JustCode is a .NET coding add-in 111 | .JustCode 112 | 113 | # TeamCity is a build add-in 114 | _TeamCity* 115 | 116 | # DotCover is a Code Coverage Tool 117 | *.dotCover 118 | 119 | # AxoCover is a Code Coverage Tool 120 | .axoCover/* 121 | !.axoCover/settings.json 122 | 123 | # Visual Studio code coverage results 124 | *.coverage 125 | *.coveragexml 126 | 127 | # NCrunch 128 | _NCrunch_* 129 | .*crunch*.local.xml 130 | nCrunchTemp_* 131 | 132 | # MightyMoose 133 | *.mm.* 134 | AutoTest.Net/ 135 | 136 | # Web workbench (sass) 137 | .sass-cache/ 138 | 139 | # Installshield output folder 140 | [Ee]xpress/ 141 | 142 | # DocProject is a documentation generator add-in 143 | DocProject/buildhelp/ 144 | DocProject/Help/*.HxT 145 | DocProject/Help/*.HxC 146 | DocProject/Help/*.hhc 147 | DocProject/Help/*.hhk 148 | DocProject/Help/*.hhp 149 | DocProject/Help/Html2 150 | DocProject/Help/html 151 | 152 | # Click-Once directory 153 | publish/ 154 | 155 | # Publish Web Output 156 | *.[Pp]ublish.xml 157 | *.azurePubxml 158 | # Note: Comment the next line if you want to checkin your web deploy settings, 159 | # but database connection strings (with potential passwords) will be unencrypted 160 | *.pubxml 161 | *.publishproj 162 | 163 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 164 | # checkin your Azure Web App publish settings, but sensitive information contained 165 | # in these scripts will be unencrypted 166 | PublishScripts/ 167 | 168 | # NuGet Packages 169 | *.nupkg 170 | # The packages folder can be ignored because of Package Restore 171 | **/packages/* 172 | # except build/, which is used as an MSBuild target. 173 | !**/packages/build/ 174 | # Uncomment if necessary however generally it will be regenerated when needed 175 | #!**/packages/repositories.config 176 | # NuGet v3's project.json files produces more ignorable files 177 | *.nuget.props 178 | *.nuget.targets 179 | 180 | # Microsoft Azure Build Output 181 | csx/ 182 | *.build.csdef 183 | 184 | # Microsoft Azure Emulator 185 | ecf/ 186 | rcf/ 187 | 188 | # Windows Store app package directories and files 189 | AppPackages/ 190 | BundleArtifacts/ 191 | Package.StoreAssociation.xml 192 | _pkginfo.txt 193 | *.appx 194 | 195 | # Visual Studio cache files 196 | # files ending in .cache can be ignored 197 | *.[Cc]ache 198 | # but keep track of directories ending in .cache 199 | !*.[Cc]ache/ 200 | 201 | # Others 202 | ClientBin/ 203 | ~$* 204 | *~ 205 | *.dbmdl 206 | *.dbproj.schemaview 207 | *.jfm 208 | *.pfx 209 | *.publishsettings 210 | orleans.codegen.cs 211 | 212 | # Since there are multiple workflows, uncomment next line to ignore bower_components 213 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 214 | #bower_components/ 215 | 216 | # RIA/Silverlight projects 217 | Generated_Code/ 218 | 219 | # Backup & report files from converting an old project file 220 | # to a newer Visual Studio version. Backup files are not needed, 221 | # because we have git ;-) 222 | _UpgradeReport_Files/ 223 | Backup*/ 224 | UpgradeLog*.XML 225 | UpgradeLog*.htm 226 | 227 | # SQL Server files 228 | *.mdf 229 | *.ldf 230 | *.ndf 231 | 232 | # Business Intelligence projects 233 | *.rdl.data 234 | *.bim.layout 235 | *.bim_*.settings 236 | 237 | # Microsoft Fakes 238 | FakesAssemblies/ 239 | 240 | # GhostDoc plugin setting file 241 | *.GhostDoc.xml 242 | 243 | # Node.js Tools for Visual Studio 244 | .ntvs_analysis.dat 245 | node_modules/ 246 | 247 | # Typescript v1 declaration files 248 | typings/ 249 | 250 | # Visual Studio 6 build log 251 | *.plg 252 | 253 | # Visual Studio 6 workspace options file 254 | *.opt 255 | 256 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 257 | *.vbw 258 | 259 | # Visual Studio LightSwitch build output 260 | **/*.HTMLClient/GeneratedArtifacts 261 | **/*.DesktopClient/GeneratedArtifacts 262 | **/*.DesktopClient/ModelManifest.xml 263 | **/*.Server/GeneratedArtifacts 264 | **/*.Server/ModelManifest.xml 265 | _Pvt_Extensions 266 | 267 | # Paket dependency manager 268 | .paket/paket.exe 269 | paket-files/ 270 | 271 | # FAKE - F# Make 272 | .fake/ 273 | 274 | # JetBrains Rider 275 | .idea/ 276 | *.sln.iml 277 | 278 | # CodeRush 279 | .cr/ 280 | 281 | # Python Tools for Visual Studio (PTVS) 282 | __pycache__/ 283 | *.pyc 284 | 285 | # Cake - Uncomment if you are using it 286 | # tools/** 287 | # !tools/packages.config 288 | 289 | # Tabs Studio 290 | *.tss 291 | 292 | # Telerik's JustMock configuration file 293 | *.jmconfig 294 | 295 | # BizTalk build output 296 | *.btp.cs 297 | *.btm.cs 298 | *.odx.cs 299 | *.xsd.cs 300 | 301 | #ExampleRangeTester artifacts 302 | TesterMetadata.xml 303 | 304 | # License files 305 | *.licx 306 | 307 | # Backup files 308 | .bak 309 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @DevExpressExampleBot -------------------------------------------------------------------------------- /CS/switcher/switcher.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.8.34309.116 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "switcher", "switcher\switcher.csproj", "{84CEBC50-4513-490B-B138-2994138270BC}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | DebugWasm|Any CPU = DebugWasm|Any CPU 12 | Release|Any CPU = Release|Any CPU 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {84CEBC50-4513-490B-B138-2994138270BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 16 | {84CEBC50-4513-490B-B138-2994138270BC}.Debug|Any CPU.Build.0 = Debug|Any CPU 17 | {84CEBC50-4513-490B-B138-2994138270BC}.DebugWasm|Any CPU.ActiveCfg = Debug|Any CPU 18 | {84CEBC50-4513-490B-B138-2994138270BC}.DebugWasm|Any CPU.Build.0 = Debug|Any CPU 19 | {84CEBC50-4513-490B-B138-2994138270BC}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {84CEBC50-4513-490B-B138-2994138270BC}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {621D779C-2600-4885-A43C-C4300AA0EA56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {621D779C-2600-4885-A43C-C4300AA0EA56}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {621D779C-2600-4885-A43C-C4300AA0EA56}.DebugWasm|Any CPU.ActiveCfg = DebugWasm|Any CPU 24 | {621D779C-2600-4885-A43C-C4300AA0EA56}.DebugWasm|Any CPU.Build.0 = DebugWasm|Any CPU 25 | {621D779C-2600-4885-A43C-C4300AA0EA56}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {621D779C-2600-4885-A43C-C4300AA0EA56}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {911173B4-D12E-4303-81D2-7E508B112B0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {911173B4-D12E-4303-81D2-7E508B112B0D}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {911173B4-D12E-4303-81D2-7E508B112B0D}.DebugWasm|Any CPU.ActiveCfg = Debug|Any CPU 30 | {911173B4-D12E-4303-81D2-7E508B112B0D}.DebugWasm|Any CPU.Build.0 = Debug|Any CPU 31 | {911173B4-D12E-4303-81D2-7E508B112B0D}.Release|Any CPU.ActiveCfg = Release|Any CPU 32 | {911173B4-D12E-4303-81D2-7E508B112B0D}.Release|Any CPU.Build.0 = Release|Any CPU 33 | EndGlobalSection 34 | GlobalSection(SolutionProperties) = preSolution 35 | HideSolutionNode = FALSE 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /CS/switcher/switcher/App.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Mvc.ViewFeatures 2 | @inject IFileVersionProvider FileVersionProvider 3 | @inject ThemeService Themes 4 | @inject Microsoft.AspNetCore.Http.IHttpContextAccessor HttpContextAccessor 5 | 6 | @{ 7 | string? InitialThemeName = HttpContextAccessor.HttpContext?.Request.Cookies["ActiveTheme"]; 8 | Themes.SetActiveThemeByName(InitialThemeName); 9 | var bsTheme = Themes.GetBootstrapThemeCssUrl(Themes.ActiveTheme); 10 | var dxTheme = Themes.GetThemeCssUrl(Themes.ActiveTheme); 11 | var hlTheme = Themes.GetHighlightJSThemeCssUrl(Themes.ActiveTheme); 12 | 13 | string AppendVersion(string path) => FileVersionProvider.AddFileVersionToPath("/", path); 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | @if (!string.IsNullOrEmpty(bsTheme)) { 23 | 24 | } 25 | @if (!string.IsNullOrEmpty(dxTheme)) { 26 | 27 | } 28 | @if (!string.IsNullOrEmpty(hlTheme)) { 29 | 30 | } 31 | 32 | @DxResourceManager.RegisterScripts() 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CS/switcher/switcher/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace switcher.Data { 2 | public class WeatherForecast { 3 | public DateOnly Date { get; set; } 4 | 5 | public int TemperatureC { get; set; } 6 | 7 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 8 | 9 | public string? Summary { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /CS/switcher/switcher/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | namespace switcher.Data { 2 | public class WeatherForecastService { 3 | private static readonly string[] Summaries = new[] 4 | { 5 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 6 | }; 7 | 8 | public Task GetForecastAsync(DateOnly startDate) { 9 | var rng = new Random(); 10 | return Task.FromResult(Enumerable.Range(1, 20).Select(index => new WeatherForecast { 11 | Date = startDate.AddDays(index), 12 | TemperatureC = rng.Next(-20, 55), 13 | Summary = Summaries[rng.Next(Summaries.Length)] 14 | }).ToArray()); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /CS/switcher/switcher/Layout/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | @inject NavigationManager NavigationManager 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 32 | 33 | 34 | 35 |
36 | 37 | @code { 38 | } 39 | -------------------------------------------------------------------------------- /CS/switcher/switcher/Layout/MainLayout.razor.css: -------------------------------------------------------------------------------- 1 | .page { 2 | height: 100%; 3 | font-family: var(--bs-font-sans-serif); 4 | } 5 | 6 | ::deep .icon-back { 7 | -webkit-mask-image: url("images/back.svg"); 8 | mask-image: url("images/back.svg"); 9 | -webkit-mask-repeat: no-repeat; 10 | mask-repeat: no-repeat; 11 | width: 1rem; 12 | height: 1rem; 13 | background-repeat: no-repeat; 14 | background-color: var(--dxbl-btn-color); 15 | } 16 | 17 | ::deep .content { 18 | overflow: auto; 19 | } 20 | 21 | ::deep .back-button:hover .icon-back { 22 | background-color: var(--dxbl-btn-hover-color); 23 | } 24 | 25 | @media (max-width: 768px) { 26 | ::deep .layout-sidebar { 27 | grid-area: header / header / header / header !important; 28 | } 29 | } -------------------------------------------------------------------------------- /CS/switcher/switcher/Layout/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /CS/switcher/switcher/Layout/NavMenu.razor.css: -------------------------------------------------------------------------------- 1 | #sidebar { 2 | min-width: 15rem; 3 | max-width: 15rem; 4 | box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.16); 5 | transition: transform 0.1s ease-out; 6 | height: 100%; 7 | max-height: 100%; 8 | background-image: linear-gradient(180deg, var(--bs-primary) 0%, var(--bs-black) 150%); 9 | } 10 | 11 | ::deep .sidebar-header { 12 | padding: 2rem 1rem; 13 | } 14 | 15 | .logo { 16 | text-align: center; 17 | } 18 | 19 | ::deep .menu-button-container { 20 | display: none; 21 | align-self: center; 22 | } 23 | 24 | .menu-button { 25 | padding: 0.375rem; 26 | width: 1.875rem; 27 | height: 1.875rem; 28 | background-image: url("images/menu.svg"); 29 | background-position: center; 30 | background-repeat: no-repeat; 31 | cursor: pointer; 32 | } 33 | 34 | ::deep .menu { 35 | background-color: inherit; 36 | } 37 | 38 | ::deep .menu .dxbl-menu-item-list { 39 | gap: 0.5rem; 40 | } 41 | 42 | ::deep .menu-item a { 43 | color: var(--bs-white); 44 | } 45 | 46 | ::deep .icon { 47 | width: 1rem; 48 | height: 1rem; 49 | background-position: center; 50 | background-repeat: no-repeat; 51 | margin-left: 0.5rem; 52 | } 53 | 54 | ::deep .home-icon { 55 | background-image: url("images/home.svg"); 56 | } 57 | 58 | ::deep .weather-icon { 59 | background-image: url("images/weather.svg"); 60 | } 61 | 62 | ::deep .counter-icon { 63 | background-image: url("images/counter.svg"); 64 | } 65 | 66 | ::deep .docs-icon { 67 | mask-image: url("images/doc.svg"); 68 | -webkit-mask-image: url("images/doc.svg"); 69 | -webkit-mask-repeat: no-repeat; 70 | mask-repeat: no-repeat; 71 | background-color: var(--dxbl-btn-color); 72 | } 73 | 74 | ::deep .demos-icon { 75 | mask-image: url("images/demos.svg"); 76 | -webkit-mask-image: url("images/demos.svg"); 77 | -webkit-mask-repeat: no-repeat; 78 | mask-repeat: no-repeat; 79 | background-color: var(--dxbl-btn-color); 80 | } 81 | 82 | ::deep .footer-button:hover .demos-icon { 83 | background-color: var(--dxbl-btn-hover-color); 84 | } 85 | 86 | ::deep .footer-button:hover .docs-icon { 87 | background-color: var(--dxbl-btn-hover-color); 88 | } 89 | 90 | ::deep .footer { 91 | text-align: center; 92 | gap: 0.5rem; 93 | padding-bottom: 1.5rem; 94 | } 95 | 96 | #sidebar.expanded ::deep .layout-item { 97 | display: block; 98 | } 99 | 100 | #sidebar.expanded ::deep .footer { 101 | display: block; 102 | } 103 | 104 | @media (max-width: 768px) { 105 | #sidebar { 106 | min-width: inherit; 107 | max-width: inherit; 108 | } 109 | 110 | #sidebar.expanded { 111 | position: fixed; 112 | width: 100%; 113 | z-index: 3; 114 | } 115 | 116 | #sidebar.expanded ::deep .sidebar-header { 117 | border-bottom: 1px solid var(--bs-white); 118 | } 119 | 120 | #sidebar.expanded .menu-button { 121 | background-image: url("images/close.svg"); 122 | } 123 | 124 | #sidebar:not(.expanded) ::deep .dxbl-gridlayout-root { 125 | gap: unset !important; 126 | } 127 | 128 | .logo { 129 | text-align: inherit; 130 | } 131 | 132 | ::deep .menu-button-container { 133 | display: block; 134 | } 135 | 136 | ::deep .layout-item { 137 | display: none; 138 | } 139 | 140 | ::deep .footer { 141 | display: none; 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /CS/switcher/switcher/NOTICE.txt: -------------------------------------------------------------------------------- 1 | The following open source libraries are used and included within thеse sample/demonstration projects: 2 | 3 | Bootstrap (Open Source – MIT License) 4 | Copyright (c) 2011-2021 Twitter, Inc. / Copyright (c) 2011-2021 The Bootstrap Authors 5 | https://github.com/twbs/bootstrap/blob/main/LICENSE 6 | 7 | open-iconic (Open Source – MIT License and SIL Open Font License) 8 | Copyright (c) 2014 Waybury 9 | https://github.com/iconic/open-iconic/blob/master/ICON-LICENSE 10 | https://github.com/iconic/open-iconic/blob/master/FONT-LICENSE 11 | 12 | The open source libraries included in these sample/demonstration projects are done so pursuant to each individual open source library license and subject to the disclaimers and limitations on liability set forth in each open source library license. -------------------------------------------------------------------------------- /CS/switcher/switcher/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | @rendermode InteractiveServer 3 | Counter 4 | 5 |

Counter

6 | 7 |
8 |
9 |
10 | @currentCount 11 |
12 |
13 | current count 14 |
15 |
16 |
17 | Click me 18 |
19 | 20 | @code { 21 | private int currentCount = 0; 22 | 23 | private void IncrementCount() 24 | { 25 | currentCount++; 26 | } 27 | } -------------------------------------------------------------------------------- /CS/switcher/switcher/Pages/Counter.razor.css: -------------------------------------------------------------------------------- 1 | .counter-block { 2 | display: flex; 3 | padding: 2.5rem 1.5rem 1.5rem 1.5rem; 4 | flex-direction: column; 5 | border-radius: 1rem; 6 | gap: 1.5rem; 7 | justify-content: center; 8 | align-items: center; 9 | width: 16.875rem; 10 | height: 17rem; 11 | position: relative; 12 | } 13 | 14 | .counter-block .counter-content { 15 | display: flex; 16 | flex-direction: column; 17 | align-items: center; 18 | gap: 0.5rem; 19 | } 20 | 21 | .counter-block .counter-count { 22 | font-size: 7.5rem; 23 | font-weight: 400; 24 | line-height: 7.75rem; 25 | } 26 | 27 | .counter-block .counter-block-back { 28 | position: absolute; 29 | top: 0; 30 | left: 0; 31 | right: 0; 32 | bottom: 0; 33 | background: var(--bs-body-color); 34 | opacity: 0.05; 35 | border-radius: 1rem; 36 | z-index: -2; 37 | } 38 | -------------------------------------------------------------------------------- /CS/switcher/switcher/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | Welcome 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 35 | 36 | 37 | 38 |
-------------------------------------------------------------------------------- /CS/switcher/switcher/Pages/Index.razor.css: -------------------------------------------------------------------------------- 1 | .welcome { 2 | height: 100%; 3 | display: flex; 4 | align-items: center; 5 | justify-content: center; 6 | } 7 | 8 | ::deep .welcome-gridlayout { 9 | margin: auto; 10 | width: auto; 11 | height: auto; 12 | } 13 | 14 | ::deep .welcome-gridlayout .dxbl-gridlayout-root { 15 | align-content: center; 16 | justify-content: center; 17 | } 18 | 19 | ::deep .welcome-title { 20 | display: flex; 21 | flex-direction: column; 22 | gap: 0.5rem; 23 | } 24 | 25 | .welcome-title .welcome-title-header { 26 | font-size: 2.5rem; 27 | font-weight: 600; 28 | letter-spacing: 0em; 29 | text-align: center; 30 | } 31 | 32 | .welcome-title .welcome-title-content { 33 | font-size: 2rem; 34 | font-weight: 400; 35 | letter-spacing: 0em; 36 | text-align: center; 37 | } 38 | 39 | ::deep .welcome-cards { 40 | display: flex; 41 | flex-wrap: wrap; 42 | gap: 1.5rem; 43 | justify-content: center; 44 | } 45 | 46 | ::deep .welcome-card { 47 | width: 26.25rem; 48 | height: 15rem; 49 | display: flex; 50 | flex-direction: column; 51 | align-items: center; 52 | justify-content: center; 53 | box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -2px rgba(0, 0, 0, 0.1); 54 | transition: box-shadow 0.2s; 55 | border-radius: 1rem; 56 | color: var(--bs-link-color-rgb); 57 | gap: 1.5rem; 58 | text-decoration: none; 59 | position: relative; 60 | } 61 | 62 | ::deep .welcome-card:hover { 63 | box-shadow: 0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 8px 10px -6px rgba(0, 0, 0, 0.1); 64 | } 65 | 66 | ::deep .welcome-card .welcome-card-img { 67 | width: 6.5rem; 68 | height: 6.5rem; 69 | } 70 | 71 | ::deep .welcome-card .welcome-card-text { 72 | font-size: 1.75rem; 73 | font-weight: 600; 74 | letter-spacing: 0em; 75 | text-align: center; 76 | text-decoration: unset; 77 | } 78 | 79 | ::deep .icon-fill { 80 | fill: var(--bs-primary); 81 | } 82 | 83 | ::deep .welcome-card .welcome-card-back { 84 | position: absolute; 85 | top: 0; 86 | left: 0; 87 | right: 0; 88 | bottom: 0; 89 | background: var(--bs-body-color); 90 | opacity: 0.05; 91 | border-radius: 1rem; 92 | z-index: -2; 93 | } -------------------------------------------------------------------------------- /CS/switcher/switcher/Pages/Weather.razor: -------------------------------------------------------------------------------- 1 | @page "/weather" 2 | 3 | @using switcher.Data 4 | @attribute [StreamRendering(true)] 5 | @rendermode InteractiveServer 6 | @inject WeatherForecastService ForecastService 7 | 8 | Weather 9 |

Weather

10 | 11 | @if (forecasts == null) 12 | { 13 |

Loading...

14 | } 15 | else 16 | { 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | } 27 | 28 | @code { 29 | private WeatherForecast[]? forecasts; 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | forecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now)); 34 | } 35 | } -------------------------------------------------------------------------------- /CS/switcher/switcher/Program.cs: -------------------------------------------------------------------------------- 1 | using switcher.Pages; 2 | using switcher.Data; 3 | using switcher; 4 | using switcher.ThemeSwitcher; 5 | 6 | 7 | var builder = WebApplication.CreateBuilder(args); 8 | 9 | // Add services to the container. 10 | builder.Services.AddRazorComponents() 11 | .AddInteractiveServerComponents() 12 | .AddInteractiveWebAssemblyComponents(); 13 | builder.Services.AddMvc(); 14 | builder.Services.AddDevExpressBlazor(options => { 15 | options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5; 16 | options.SizeMode = DevExpress.Blazor.SizeMode.Medium; 17 | }); 18 | builder.Services.AddSingleton(); 19 | builder.Services.AddRazorComponents().AddInteractiveServerComponents(); 20 | builder.Services.AddHttpContextAccessor(); 21 | builder.Services.AddScoped(); 22 | builder.WebHost.UseWebRoot("wwwroot"); 23 | builder.WebHost.UseStaticWebAssets(); 24 | var app = builder.Build(); 25 | 26 | // Configure the HTTP request pipeline. 27 | if(app.Environment.IsDevelopment()) { 28 | app.UseWebAssemblyDebugging(); 29 | } else { 30 | app.UseExceptionHandler("/Error", createScopeForErrors: true); 31 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 32 | app.UseHsts(); 33 | } 34 | app.UseHttpsRedirection(); 35 | 36 | app.UseStaticFiles(); 37 | app.UseAntiforgery(); 38 | 39 | app.MapRazorComponents() 40 | .AddInteractiveServerRenderMode() 41 | .AddInteractiveWebAssemblyRenderMode() 42 | .AddInteractiveServerRenderMode(); 43 | 44 | app.Run(); -------------------------------------------------------------------------------- /CS/switcher/switcher/Routes.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /CS/switcher/switcher/ThemeSwitcher/Theme.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | 3 | namespace switcher.ThemeSwitcher { 4 | public class Theme { 5 | const string BsNativeDarkModePostfix = "-dark"; 6 | public string Name { get; } 7 | public string Title { get { return CultureInfo.InvariantCulture.TextInfo.ToTitleCase(Name.Replace("-", " ")); } } 8 | public string IconCssClass { get { return Name.ToLower(); } } 9 | public bool IsBootstrapNative { get; } 10 | public string BootstrapThemeMode => IsBootstrapNative && Name.Contains(BsNativeDarkModePostfix) ? "dark" : "light"; 11 | public string GetCssClass(bool isActive) => isActive ? "active" : "text-body"; 12 | public string ThemePath => IsBootstrapNative ? Name.Replace(BsNativeDarkModePostfix, string.Empty) : Name; 13 | public Theme(string name, bool isBootstrapNative) { 14 | Name = name; 15 | IsBootstrapNative = isBootstrapNative; 16 | } 17 | } 18 | 19 | public class ThemeSet { 20 | static readonly HashSet BuiltInThemes = new HashSet() { 21 | "blazing-berry", "blazing-dark", "purple", "office-white", "fluent-light", "fluent-dark" 22 | }; 23 | public string Title { get; } 24 | public Theme[] Themes { get; } 25 | public ThemeSet(string title, params string[] themes) { 26 | Title = title; 27 | Themes = themes.Select(CreateTheme).ToArray(); 28 | 29 | 30 | Theme CreateTheme(string name) { 31 | bool isBootstrapNative = !BuiltInThemes.Contains(name); 32 | return new Theme(name, isBootstrapNative); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /CS/switcher/switcher/ThemeSwitcher/ThemeJsChangeDispatcher.cs: -------------------------------------------------------------------------------- 1 | using DevExpress.Blazor.Internal; 2 | using Microsoft.AspNetCore.Components; 3 | using Microsoft.JSInterop; 4 | 5 | namespace switcher.ThemeSwitcher; 6 | 7 | public class ThemeJsChangeDispatcher : ComponentBase, IThemeChangeRequestDispatcher, IAsyncDisposable { 8 | [Parameter] 9 | public required string InitialThemeName { get; set; } 10 | [Inject] 11 | private ISafeJSRuntime? JsRuntime { get; set; } 12 | [Inject] 13 | private ThemeService Themes { get; set; } = new ThemeService(); 14 | 15 | private Theme? _pendingTheme; 16 | private IJSObjectReference? _module; 17 | 18 | protected override void OnInitialized() { 19 | base.OnInitialized(); 20 | Themes.ThemeChangeRequestDispatcher = this; 21 | if(Themes.ActiveTheme == null) 22 | Themes.SetActiveThemeByName(InitialThemeName); 23 | } 24 | 25 | protected override async Task OnAfterRenderAsync(bool firstRender) { 26 | await base.OnAfterRenderAsync(firstRender); 27 | if(firstRender && JsRuntime != null) 28 | _module = await JsRuntime.InvokeAsync("import", "./switcher-resources/theme-controller.js"); 29 | } 30 | 31 | public async void RequestThemeChange(Theme theme) { 32 | if(_pendingTheme == theme) return; 33 | _pendingTheme = theme; 34 | 35 | if (_module != null) 36 | await _module.InvokeVoidAsync("ThemeController.setStylesheetLinks", 37 | theme.Name, 38 | Themes.GetBootstrapThemeCssUrl(theme), 39 | theme.BootstrapThemeMode, 40 | Themes.GetThemeCssUrl(theme), 41 | Themes.GetHighlightJSThemeCssUrl(theme), 42 | DotNetObjectReference.Create(this)); 43 | } 44 | 45 | [JSInvokable] 46 | public async Task ThemeLoadedAsync() { 47 | if(Themes.ThemeLoadNotifier != null && _pendingTheme != null) { 48 | await Themes.ThemeLoadNotifier.NotifyThemeLoadedAsync(_pendingTheme); 49 | } 50 | _pendingTheme = null; 51 | } 52 | 53 | public async ValueTask DisposeAsync() { 54 | try { 55 | if(_module != null) 56 | await _module.DisposeAsync(); 57 | } catch(JSDisconnectedException) { 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /CS/switcher/switcher/ThemeSwitcher/ThemeService.cs: -------------------------------------------------------------------------------- 1 | namespace switcher.ThemeSwitcher { 2 | public interface IThemeChangeRequestDispatcher { 3 | void RequestThemeChange(Theme theme); 4 | } 5 | 6 | public interface IThemeLoadNotifier { 7 | Task NotifyThemeLoadedAsync(Theme theme); 8 | } 9 | 10 | public class ThemeService { 11 | public static readonly string DEFAULT_THEME_NAME = "blazing-berry"; 12 | static readonly string[] NEW_BLAZOR_THEMES = [DEFAULT_THEME_NAME, "blazing-dark", "purple", "office-white", "fluent-light", "fluent-dark"]; 13 | static readonly Dictionary HIGHLIGHT_JS_THEME = new() { 14 | { DEFAULT_THEME_NAME, "default" }, 15 | { "blazing-dark", "androidstudio" }, 16 | { "cyborg", "androidstudio" }, 17 | { "default-dark", "androidstudio" } 18 | }; 19 | 20 | readonly Theme defaultTheme; 21 | public Theme ActiveTheme { get; private set; } 22 | public List ThemeSets { get; } 23 | public IThemeChangeRequestDispatcher? ThemeChangeRequestDispatcher { get; set; } 24 | public IThemeLoadNotifier? ThemeLoadNotifier { get; set; } 25 | 26 | public ThemeService() { 27 | ThemeSets = CreateSets(this); 28 | 29 | ActiveTheme = defaultTheme = FindThemeByName(DEFAULT_THEME_NAME)!; 30 | } 31 | 32 | public string GetThemeCssUrl(Theme theme) { 33 | if (Array.IndexOf(NEW_BLAZOR_THEMES, theme.Name) > -1) 34 | return $"_content/DevExpress.Blazor.Themes/{theme.Name}.bs5.min.css"; 35 | return $"_content/DevExpress.Blazor.Themes/bootstrap-external.bs5.min.css"; 36 | } 37 | public string? GetBootstrapThemeCssUrl(Theme theme) { 38 | return theme.IsBootstrapNative ? 39 | $"switcher-resources/css/themes/{theme.ThemePath}/bootstrap.min.css" : null; 40 | } 41 | public string GetHighlightJSThemeCssUrl(Theme theme) { 42 | var highlightjsTheme = HIGHLIGHT_JS_THEME[DEFAULT_THEME_NAME]; 43 | if(HIGHLIGHT_JS_THEME.ContainsKey(theme.Name)) 44 | highlightjsTheme = HIGHLIGHT_JS_THEME[theme.Name]; 45 | return $"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/{highlightjsTheme}.min.css"; 46 | } 47 | public void SetActiveThemeByName(string? themeName) { 48 | ActiveTheme = FindThemeByName(themeName) ?? defaultTheme; 49 | } 50 | 51 | private Theme? FindThemeByName(string? themeName) { 52 | var themes = ThemeSets.SelectMany(ts => ts.Themes); 53 | foreach(var theme in themes) { 54 | if(theme.Name == themeName) 55 | return theme; 56 | } 57 | return null; 58 | } 59 | 60 | private static List CreateSets(ThemeService config) { 61 | return new List() { 62 | new ThemeSet("DevExpress Themes", NEW_BLAZOR_THEMES), 63 | new ThemeSet("Bootstrap Themes", "default", "default-dark", "cerulean", "cyborg", "flatly", "journal", "litera", "lumen", "lux", "pulse", "simplex", "solar", "superhero", "united", "yeti"), 64 | }; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /CS/switcher/switcher/ThemeSwitcher/ThemeSwitcher.razor: -------------------------------------------------------------------------------- 1 | @implements IDisposable 2 | @inject ThemeService Themes 3 | @inject PersistentComponentState ApplicationState 4 | 5 | @rendermode InteractiveServer 6 | 7 |
8 |
9 | 14 | 15 |
16 | 17 |
18 | 19 | @code { 20 | string _themeName; 21 | bool _themeSwitcherShown; 22 | PersistingComponentStateSubscription _persistingSubscription; 23 | 24 | protected string ThemeName { 25 | get { return _themeName; } 26 | set { 27 | if (_themeName != value) { 28 | _themeName = value; 29 | Themes.SetActiveThemeByName(value); 30 | } 31 | } 32 | } 33 | 34 | protected bool IsBootstrapNative { 35 | get { return Themes.ActiveTheme.IsBootstrapNative; } 36 | } 37 | bool ThemeSwitcherShown { 38 | get { return _themeSwitcherShown; } 39 | set { 40 | if (_themeSwitcherShown != value) { 41 | _themeSwitcherShown = value; 42 | } 43 | } 44 | } 45 | protected override void OnInitialized() { 46 | _persistingSubscription = ApplicationState.RegisterOnPersisting(PersistData); 47 | if (ApplicationState.TryTakeFromJson("ThemeName", out var themeName) && themeName != null) 48 | ThemeName = themeName; 49 | else 50 | ThemeName = Themes.ActiveTheme?.Name ?? string.Empty; 51 | } 52 | void ToggleThemeSwitcherPanel() { 53 | ThemeSwitcherShown = !ThemeSwitcherShown; 54 | } 55 | string GetThemeSwitcherCssClass() { 56 | return "themeswitcher-button theme-settings " + ThemeSwitcherShown; 57 | } 58 | string GetHeaderContainerCss() { 59 | List cssClasses = new List(); 60 | cssClasses.Add("theme-" + ThemeName.Replace(" ", "-")); 61 | if (IsBootstrapNative) 62 | cssClasses.Add("theme-external"); 63 | return string.Join(" ", cssClasses); 64 | } 65 | Task PersistData() { 66 | ApplicationState.PersistAsJson("ThemeName", ThemeName); 67 | return Task.CompletedTask; 68 | } 69 | void IDisposable.Dispose() { 70 | _persistingSubscription.Dispose(); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /CS/switcher/switcher/ThemeSwitcher/ThemeSwitcherContainer.razor: -------------------------------------------------------------------------------- 1 | @inject ThemeService Themes 2 | @implements IDisposable 3 | @implements IThemeLoadNotifier 4 | @rendermode InteractiveServer 5 | 6 |
7 | @if(IsLoaded) { 8 |
9 |
10 | @foreach(var themeSet in Themes.ThemeSets) { 11 | @themeSet.Title 12 | @foreach(var theme in themeSet.Themes) { 13 | 14 | } 15 | } 16 |
17 |
18 | } 19 |
20 | 21 | @code { 22 | [Parameter] 23 | public bool Shown { get; set; } 24 | [Parameter] 25 | public EventCallback ShownChanged { get; set; } 26 | [Parameter] 27 | public string ThemeName { get; set; } 28 | [Parameter] 29 | public EventCallback ThemeNameChanged { get; set; } 30 | 31 | string StateCssClass { get { return IsLoaded ? ((Shown? "themeswitcher-container-shown" : "themeswitcher-container-hidden")) : ""; } } 32 | bool IsLoaded { get; set; } 33 | 34 | protected override void OnInitialized() { 35 | base.OnInitialized(); 36 | Themes.ThemeLoadNotifier = this; 37 | } 38 | 39 | async Task ThemeSwitcherItem_Click(Theme theme) { 40 | Themes.ThemeChangeRequestDispatcher?.RequestThemeChange(theme); 41 | await ToggleThemeSwitcherPanel(false); 42 | } 43 | 44 | public async Task NotifyThemeLoadedAsync(Theme theme) { 45 | ThemeName = theme.Name; 46 | await ThemeNameChanged.InvokeAsync(ThemeName); 47 | } 48 | 49 | async Task ToggleThemeSwitcherPanel(bool shown) { 50 | if(shown != Shown) { 51 | Shown = shown; 52 | await ShownChanged.InvokeAsync(shown); 53 | } 54 | } 55 | 56 | protected override void OnAfterRender(bool firstRender) { 57 | if(firstRender) { 58 | IsLoaded = true; 59 | if(Shown) 60 | StateHasChanged(); 61 | } 62 | } 63 | 64 | public void Dispose() { 65 | Themes.ThemeLoadNotifier = null; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /CS/switcher/switcher/ThemeSwitcher/ThemeSwitcherItem.razor: -------------------------------------------------------------------------------- 1 | @inject ThemeService Themes 2 | @rendermode InteractiveServer 3 | 4 | 7 | @Theme.Title 8 | 9 | @code { 10 | [Parameter] public Theme Theme { get; set; } 11 | [Parameter] public EventCallback Click { get; set; } 12 | 13 | async Task Anchor_Click() { 14 | await Click.InvokeAsync(Theme); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /CS/switcher/switcher/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.Web.Virtualization 7 | @using Microsoft.JSInterop 8 | @using static Microsoft.AspNetCore.Components.Web.RenderMode 9 | @using switcher 10 | @using switcher.Pages 11 | @using switcher.Layout 12 | @using switcher.ThemeSwitcher 13 | 14 | @using DevExpress.Blazor -------------------------------------------------------------------------------- /CS/switcher/switcher/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /CS/switcher/switcher/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /CS/switcher/switcher/switcher.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | enable 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/FONT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/ICON-LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress-Examples/blazor-theme-switcher/9780e8aa9fe5b360c84211d891a9076a34cc83cb/CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress-Examples/blazor-theme-switcher/9780e8aa9fe5b360c84211d891a9076a34cc83cb/CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 9 | By P.J. Onori 10 | Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) 11 | 12 | 13 | 14 | 27 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 45 | 47 | 49 | 51 | 53 | 55 | 57 | 59 | 61 | 63 | 65 | 67 | 69 | 71 | 74 | 76 | 79 | 81 | 84 | 86 | 88 | 91 | 93 | 95 | 98 | 100 | 102 | 104 | 106 | 109 | 112 | 115 | 117 | 121 | 123 | 125 | 127 | 130 | 132 | 134 | 136 | 138 | 141 | 143 | 145 | 147 | 149 | 151 | 153 | 155 | 157 | 159 | 162 | 165 | 167 | 169 | 172 | 174 | 177 | 179 | 181 | 183 | 185 | 189 | 191 | 194 | 196 | 198 | 200 | 202 | 205 | 207 | 209 | 211 | 213 | 215 | 218 | 220 | 222 | 224 | 226 | 228 | 230 | 232 | 234 | 236 | 238 | 241 | 243 | 245 | 247 | 249 | 251 | 253 | 256 | 259 | 261 | 263 | 265 | 267 | 269 | 272 | 274 | 276 | 280 | 282 | 285 | 287 | 289 | 292 | 295 | 298 | 300 | 302 | 304 | 306 | 309 | 312 | 314 | 316 | 318 | 320 | 322 | 324 | 326 | 330 | 334 | 338 | 340 | 343 | 345 | 347 | 349 | 351 | 353 | 355 | 358 | 360 | 363 | 365 | 367 | 369 | 371 | 373 | 375 | 377 | 379 | 381 | 383 | 386 | 388 | 390 | 392 | 394 | 396 | 399 | 401 | 404 | 406 | 408 | 410 | 412 | 414 | 416 | 419 | 421 | 423 | 425 | 428 | 431 | 435 | 438 | 440 | 442 | 444 | 446 | 448 | 451 | 453 | 455 | 457 | 460 | 462 | 464 | 466 | 468 | 471 | 473 | 477 | 479 | 481 | 483 | 486 | 488 | 490 | 492 | 494 | 496 | 499 | 501 | 504 | 506 | 509 | 512 | 515 | 517 | 520 | 522 | 524 | 526 | 529 | 532 | 534 | 536 | 539 | 542 | 543 | 544 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress-Examples/blazor-theme-switcher/9780e8aa9fe5b360c84211d891a9076a34cc83cb/CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress-Examples/blazor-theme-switcher/9780e8aa9fe5b360c84211d891a9076a34cc83cb/CS/switcher/switcher/wwwroot/css/open.iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open.iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | html, body { 8 | height: 100%; 9 | overflow: hidden; 10 | } 11 | 12 | .valid.modified:not([type=checkbox]) { 13 | outline: 1px solid #26b050; 14 | } 15 | 16 | .invalid { 17 | outline: 1px solid red; 18 | } 19 | 20 | .validation-message { 21 | color: red; 22 | } 23 | 24 | .button-link { 25 | text-decoration: unset; 26 | } 27 | 28 | #blazor-error-ui { 29 | background: lightyellow; 30 | bottom: 0; 31 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 32 | display: none; 33 | left: 0; 34 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 35 | position: fixed; 36 | width: 100%; 37 | z-index: 1000; 38 | } 39 | 40 | #blazor-error-ui .dismiss { 41 | cursor: pointer; 42 | position: absolute; 43 | right: 0.75rem; 44 | top: 0.5rem; 45 | } 46 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress-Examples/blazor-theme-switcher/9780e8aa9fe5b360c84211d891a9076a34cc83cb/CS/switcher/switcher/wwwroot/favicon.ico -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/cards.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/counter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/demos.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/doc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/images/weather.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/switcher-resources/css/theme-switcher.css: -------------------------------------------------------------------------------- 1 | .dxbl-image.theme-icon { 2 | width: 1rem; 3 | height: 1rem; 4 | background-color: var(--bs-body-color); 5 | mask-image: url("../../switcher-resources/theme.svg"); 6 | -webkit-mask-image: url("../../switcher-resources/theme.svg"); 7 | mask-repeat: no-repeat; 8 | -webkit-mask-repeat: no-repeat; 9 | } 10 | 11 | .blazor-themes { 12 | border-radius: 0; 13 | border: none; 14 | } 15 | 16 | .blazor-themes, 17 | .blazor-themes div, 18 | .blazor-themes .list-group, 19 | .blazor-themes .themeswitcher-group { 20 | background-color: inherit; 21 | } 22 | 23 | .blazor-themes .list-group { 24 | flex-flow: row wrap; 25 | border: none; 26 | color: inherit; 27 | } 28 | 29 | .blazor-themes .list-group-item { 30 | flex: 1 0 100%; 31 | font-size: 1em; 32 | white-space: nowrap; 33 | padding: .5rem .75rem; 34 | border-radius: 0; 35 | } 36 | 37 | .blazor-themes .list-group-item-action:not(.active):not(:hover) { 38 | background: none; 39 | } 40 | 41 | .blazor-themes .list-group-item-action { 42 | flex: 1 0 50%; 43 | max-width: 50%; 44 | font-weight: 500; 45 | border-color: transparent; 46 | } 47 | 48 | .blazor-themes .themeswitcher-group { 49 | font-weight: 600; 50 | position: sticky; 51 | top: 0; 52 | z-index: 3; 53 | color: inherit; 54 | border: none; 55 | margin-bottom: 0; 56 | } 57 | 58 | .blazor-themes .themeswitcher-group:not(:first-child):before, 59 | .blazor-themes .themeswitcher-group::after { 60 | content: ""; 61 | position: absolute; 62 | width: 100%; 63 | left: 0; 64 | border-top: 1px solid currentColor; 65 | opacity: 0.15; 66 | } 67 | 68 | .blazor-themes .themeswitcher-group:not(:first-child):before { 69 | top: 0; 70 | } 71 | 72 | .blazor-themes .themeswitcher-group::after { 73 | bottom: 0; 74 | } 75 | 76 | .blazor-themes .themeswitcher-item > span { 77 | opacity: 0.8; 78 | } 79 | 80 | .blazor-themes a.list-group-item-action:before { 81 | content: ""; 82 | display: inline; 83 | margin: 0 .75rem 0 .5rem; 84 | padding-right: 1.2em; 85 | } 86 | 87 | .blazor-themes a:before { 88 | border: 1px solid #fff; 89 | } 90 | 91 | .theme-pulse .blazor-themes .themeswitcher-item:hover > span { 92 | color: white; 93 | } 94 | 95 | .themeswitcher-button { 96 | position: absolute; 97 | top: 5px; 98 | right: 0; 99 | height: 0; 100 | } 101 | 102 | .themeswitcher-container { 103 | background-color: var(--bs-body-bg); 104 | position: absolute; 105 | top: calc(3.5rem + 1px); 106 | right: 0; 107 | width: 320px; 108 | height: 0; 109 | max-height: calc(100vh - 3.5rem); 110 | overflow: hidden; 111 | z-index: 1029; 112 | } 113 | 114 | .themeswitcher-container-shown, 115 | .themeswitcher-container-hidden { 116 | transition: height 0.2s ease-in-out; 117 | } 118 | 119 | .themeswitcher-container-shown { 120 | height: calc(100vh - 3.5rem); 121 | } 122 | 123 | @media (max-width: 1199.98px) { 124 | .themeswitcher-container { 125 | position: fixed; 126 | top: 3.5rem; 127 | width: 320px; 128 | height: calc(100% - 3.5rem); 129 | transform: translateX(100%); 130 | } 131 | 132 | .themeswitcher-container-shown, 133 | .themeswitcher-container-hidden { 134 | transition: transform 0.2s ease-in-out; 135 | } 136 | 137 | .themeswitcher-container-shown { 138 | transform: translateX(0); 139 | } 140 | } 141 | 142 | .theme-settings { 143 | margin-right: .5rem; 144 | } 145 | 146 | .theme-settings:hover .theme-icon { 147 | background-color: currentColor; 148 | } 149 | 150 | .btn-container > .theme-settings { 151 | --dxbl-btn-border-radius: 50%; 152 | width: 2.125rem; 153 | height: 2.125rem; 154 | border-width: 2px; 155 | align-items: center; 156 | justify-content: center; 157 | display: flex; 158 | } 159 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/switcher-resources/css/themes.css: -------------------------------------------------------------------------------- 1 | .blazor-themes a.blazing-berry:before { 2 | background: #5c2d91; 3 | } 4 | 5 | .blazor-themes a.blazing-dark:before { 6 | background: #46444a; 7 | } 8 | 9 | .blazor-themes a.office-white:before { 10 | background: #fe7109; 11 | } 12 | 13 | .blazor-themes a.purple:before { 14 | background: #7989ff; 15 | } 16 | 17 | 18 | .blazor-themes a.default:before { 19 | background: #007bff; 20 | } 21 | 22 | .blazor-themes a.default-dark:before { 23 | background: #212529; 24 | } 25 | 26 | .blazor-themes a.cerulean:before { 27 | background: #2fa4e7; 28 | } 29 | 30 | .blazor-themes a.cyborg:before { 31 | background: #060606; 32 | } 33 | 34 | .blazor-themes a.flatly:before { 35 | background: #dce4ec; 36 | } 37 | 38 | .blazor-themes a.journal:before { 39 | background: #eb6864; 40 | } 41 | 42 | .blazor-themes a.litera:before { 43 | background: #4582ec; 44 | } 45 | 46 | .blazor-themes a.lumen:before { 47 | background: #158cba; 48 | } 49 | 50 | .blazor-themes a.lux:before { 51 | background: #1a1a1a; 52 | } 53 | 54 | .blazor-themes a.pulse:before { 55 | background: #593196; 56 | } 57 | 58 | .blazor-themes a.simplex:before { 59 | background: #d9230f; 60 | } 61 | 62 | .blazor-themes a.solar:before { 63 | background: #b58900; 64 | } 65 | 66 | .blazor-themes a.superhero:before { 67 | background: #df691a; 68 | } 69 | 70 | .blazor-themes a.united:before { 71 | background: #e95420; 72 | } 73 | 74 | .blazor-themes a.yeti:before { 75 | background: #008cba; 76 | } 77 | 78 | .theme-external { 79 | font-size: 0.875rem; 80 | } 81 | 82 | .blazor-themes a.fluent-light:before { 83 | background: #0f6cbd; 84 | } 85 | 86 | .blazor-themes a.fluent-dark:before { 87 | background: #282828; 88 | } 89 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/switcher-resources/theme-controller.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | export const ThemeController = (function () { 4 | let abortController; 5 | 6 | function getLink(attr) { 7 | return document.querySelector(`#switcher-container link[${attr}]`); 8 | } 9 | 10 | function getLinks(attr) { 11 | return [...document.querySelectorAll(`#switcher-container link[${attr}]`)]; 12 | } 13 | 14 | function createLoadHandler(link, loadingPromises, signal, interception = false) { 15 | link.dxIntercepted = interception; 16 | let resolve; 17 | loadingPromises.push(new Promise(r => resolve = r)); 18 | link.addEventListener('load', () => { 19 | if (signal.aborted && !link.dxIntercepted) 20 | link.remove(); 21 | link.dxIntercepted = false; 22 | resolve(); 23 | }); 24 | } 25 | 26 | function updateTheme(url, group, loadingPromises, signal, target, isTargetBefore) { 27 | const attr = `${group}-theme-link`; 28 | const links = getLinks(attr); 29 | if (!links.length && !url || links.length === 1 && links[0].href === url) return []; 30 | 31 | if (url) { 32 | const link = links.find(l => l.href === url); 33 | 34 | if (link) { 35 | if (![...document.styleSheets].some(css => css.href === url)) { 36 | createLoadHandler(link, loadingPromises, signal, true); 37 | } 38 | } else { 39 | const container = document.getElementById("switcher-container"); 40 | const newLink = document.createElement("link"); 41 | newLink.rel = "stylesheet"; 42 | newLink.href = url; 43 | newLink.setAttribute(attr, ""); 44 | createLoadHandler(newLink, loadingPromises, signal); 45 | if (target) 46 | isTargetBefore ? target.before(newLink) : target.after(newLink); 47 | else 48 | container.append(newLink); 49 | } 50 | } 51 | 52 | return links.filter(l => l.href !== url); 53 | } 54 | 55 | async function setStylesheetLinks(theme, bsUrl, bsThemeMode, dxUrl, hlUrl, reference) { 56 | abortController?.abort(); 57 | abortController = new AbortController(); 58 | const signal = abortController.signal; 59 | 60 | const loadingPromises = []; 61 | const Link = getLink('dx-link'); 62 | const oldLinks = updateTheme(bsUrl, 'bs', loadingPromises, signal, Link, true) 63 | .concat(updateTheme(dxUrl, 'dx', loadingPromises, signal, getLink('bs-theme-link') ?? Link, !getLink('bs-theme-link'))) 64 | .concat(updateTheme(hlUrl, 'hl', loadingPromises, signal)); 65 | await Promise.all(loadingPromises); 66 | 67 | if (signal.aborted) return; 68 | 69 | for (const link of oldLinks) { 70 | link.remove(); 71 | } 72 | 73 | document.querySelector("HTML").setAttribute("data-bs-theme", bsThemeMode); 74 | document.cookie = `ActiveTheme=${theme};path=/`; 75 | 76 | await reference.invokeMethodAsync("ThemeLoadedAsync"); 77 | } 78 | 79 | return { 80 | setStylesheetLinks 81 | } 82 | })(); 83 | -------------------------------------------------------------------------------- /CS/switcher/switcher/wwwroot/switcher-resources/theme.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This code example is provided "as is" without warranty of any kind. Developer Express Inc ("DevExpress") disclaims all warranties, 2 | either express or implied, including the warranties of merchantability and fitness for a particular purpose. 3 | 4 | For licensing terms and conditions of DevExpress product(s) required for, or associated with the use of this code example, 5 | please refer to the applicable End-User License Agreement at https://www.devexpress.com/Support/licensingfaq.xml -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | 2 | ![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/227836631/24.2.3%2B) 3 | [![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T845557) 4 | [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) 5 | [![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives) 6 | 7 | # How to implement a Theme Switcher in Blazor applications 8 | 9 | This example demonstrates how to add a Theme Switcher to your application. The switcher in this example is the same as in [DevExpress Blazor Demos](https://demos.devexpress.com/blazor/). It allows users to switch between [DevExpress built-in themes](https://docs.devexpress.com/Blazor/401523/common-concepts/customize-appearance/themes) and external Bootstrap themes (the default theme and [free Bootswatch options](https://bootswatch.com/)). 10 | 11 | 12 | ![Blazor - Theme Switcher](images/blazor-theme-switcher.png) 13 | 14 | The example's solution targets .NET 8, but you can also integrate this Theme Switcher in projects that target .NET 6 and .NET 7. 15 | 16 | ## Add a Theme Switcher to an Application 17 | 18 | Follow the steps below to add a Theme Switcher into your application: 19 | 20 | 1. Copy this example's [ThemeSwitcher](./CS/switcher/switcher/ThemeSwitcher) folder to your project. 21 | 2. In the *_Imports.razor* file, import the `switcher.ThemeSwitcher` namespace and files located in the *ThemeSwitcher* folder: 22 | 23 | ```cs 24 | @using .ThemeSwitcher 25 | @using switcher.ThemeSwitcher 26 | ``` 27 | 28 | 3. Copy this example's [switcher-resources](./CS/switcher/switcher/wwwroot/switcher-resources) folder to your application's *wwwroot* folder. The *switcher-resources* folder has the following structure: 29 | 30 | * **css/themes** 31 | Includes nested folders whose names correspond to external Bootstrap themes. Each nested folder stores an external theme's stylesheet (*bootstrap.min.css*). Note that built-in DevExpress themes are added to the application with DevExpress Blazor components and stored separately in the **DevExpress.Blazor.Themes** NuGet package. 32 | 33 | * **css/themes.css** 34 | Contains CSS rules used to draw colored squares for each theme in the Theme Switcher. 35 | * **css/theme-switcher.css** 36 | Contains CSS rules that define the Theme Switcher's appearance and behavior. 37 | * **theme-controller.js** 38 | Contains functions that add and remove links to theme stylesheets. 39 | * **theme.svg** 40 | An icon displayed in the Theme Switcher. 41 | 42 | 4. In the layout file, use the [HttpContextAccessor](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.httpcontextaccessor?view=aspnetcore-8.0) class to obtain the current theme from cookies: 43 | ```html 44 | @using Microsoft.AspNetCore.Mvc.ViewFeatures 45 | @inject IFileVersionProvider FileVersionProvider 46 | @inject ThemeService Themes 47 | @inject Microsoft.AspNetCore.Http.IHttpContextAccessor HttpContextAccessor 48 | @{ 49 | string? InitialThemeName = HttpContextAccessor.HttpContext?.Request.Cookies["ActiveTheme"]; 50 | Themes.SetActiveThemeByName(InitialThemeName); 51 | var bsTheme = Themes.GetBootstrapThemeCssUrl(Themes.ActiveTheme); 52 | var dxTheme = Themes.GetThemeCssUrl(Themes.ActiveTheme); 53 | var hlTheme = Themes.GetHighlightJSThemeCssUrl(Themes.ActiveTheme); 54 | 55 | string AppendVersion(string path) => FileVersionProvider.AddFileVersionToPath("/", path); 56 | } 57 | ``` 58 | 5. In the `head` section of the layout file, replace a link to a theme stylesheet with the following code: 59 | ```html 60 | 61 | @if (!string.IsNullOrEmpty(bsTheme)) { 62 | 63 | } 64 | @if (!string.IsNullOrEmpty(dxTheme)) { 65 | 66 | } 67 | @if (!string.IsNullOrEmpty(hlTheme)) { 68 | 69 | } 70 | 71 | ``` 72 | 6. Register the Theme Switcher's styles in the `head` section of the layout file: 73 | ```html 74 | 75 | 76 | 77 | @* ... *@ 78 | 79 | ``` 80 | 7. Add the following `div` element to the `body` section of the layout file: 81 | ```html 82 | 83 |
84 | @* ... *@ 85 | 86 | ``` 87 | 8. Register `Mvc` and `ThemeService` in the `Program.cs` file: 88 | ```cs 89 | builder.Services.AddMvc(); 90 | builder.Services.AddScoped(); 91 | ``` 92 | 9. Declare the Theme Switcher component in the *MainLayout.razor* file: 93 | ```razor 94 | 95 | ``` 96 | 10. *For .NET 6 and .NET 7 applications.* Remove the `@rendermode InteractiveServer` directive from [ThemeSwitcher.razor](./CS/switcher/switcher/ThemeSwitcher/ThemeSwitcher.razor#L2), [ThemeSwitcherContainer.razor](./CS/switcher/switcher/ThemeSwitcher/ThemeSwitcherContainer.razor#L4), and [ThemeSwitcherItem.razor](./CS/switcher/switcher/ThemeSwitcher/ThemeSwitcherItem.razor#L2) files. 97 | 98 | ## Add Themes to the Theme Switcher 99 | 100 | Follow the steps below to add an external Bootstrap theme to the Theme Switcher: 101 | 102 | 1. In the **wwwroot/css/themes** folder, create a new folder for this theme. The folder and theme names should match. 103 | 104 | 2. Add the theme's stylesheet (*bootstrap.min.css*) to the newly created folder. 105 | 106 | 3. Add the following CSS rule to the *wwwroot/css/themes.css* file: 107 | 108 | ```css 109 | .blazor-themes a.:before { 110 | background: ; 111 | } 112 | ``` 113 | 114 | 4. In *ThemeService.cs*, add the theme name to the **Bootstrap Themes** theme set: 115 | 116 | 117 | ```cs 118 | private static List CreateSets(ThemeService config) { 119 | return new List() { 120 | new ThemeSet("DevExpress Themes", NEW_BLAZOR_THEMES), 121 | new ThemeSet("Bootstrap Themes", "", "default", "default-dark", "cerulean") 122 | }; 123 | } 124 | ``` 125 | 126 | ## Remove Themes from the Theme Switcher 127 | 128 | Follow the steps below to remove a built-in DevExpress or external Bootstrap theme from the Theme Switcher: 129 | 130 | 1. Open *ThemeService.cs* and remove the theme name from the **DevExpress Themes** or **Bootstrap Themes** theme set: 131 | 132 | ```cs 133 | private static List CreateSets(ThemeService config) { 134 | return new List() { 135 | new ThemeSet("DevExpress Themes", NEW_BLAZOR_THEMES), 136 | new ThemeSet("Bootstrap Themes", /*""*/, "default", "default-dark", "cerulean") 137 | }; 138 | } 139 | ``` 140 | 141 | 2. Remove the CSS rule that corresponds to this theme from the *wwwroot/css/themes.css* file. 142 | 143 | ```css 144 | /* .blazor-themes a.:before { 145 | background: ; 146 | }*/ 147 | ``` 148 | 149 | 3. *For an external Bootstrap theme.* Delete the *wwwroot/css/themes/\* folder. 150 | 151 | ## Files to Review 152 | 153 | * [ThemeSwitcher](./CS/switcher/switcher/ThemeSwitcher) (folder) 154 | * [switcher-resources](./CS/switcher/switcher/wwwroot/switcher-resources) (folder) 155 | * [App.razor](./CS/switcher/switcher/App.razor) 156 | * [MainLayout.razor](./CS/switcher/switcher/Layout/MainLayout.razor) 157 | * [Program.cs](./CS/switcher/switcher/Program.cs) 158 | 159 | ## Documentation 160 | 161 | * [Themes](https://docs.devexpress.com/Blazor/401523/common-concepts/themes) 162 | 163 | ## Does this example address your development requirements/objectives? 164 | 165 | [](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=blazor-theme-switcher&~~~was_helpful=yes) [](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=blazor-theme-switcher&~~~was_helpful=no) 166 | 167 | (you will be redirected to DevExpress.com to submit your response) 168 | 169 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoGenerateVb": false, 3 | "runOnWeb": false 4 | } -------------------------------------------------------------------------------- /images/blazor-theme-switcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress-Examples/blazor-theme-switcher/9780e8aa9fe5b360c84211d891a9076a34cc83cb/images/blazor-theme-switcher.png --------------------------------------------------------------------------------