Skip to content

Commit 3c5c6ff

Browse files
committed
Added Blazor Web App Getting Started samples
1 parent 3c5c016 commit 3c5c6ff

File tree

208 files changed

+5472
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+5472
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
8+
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
13+
<PackageReference Include="Syncfusion.Blazor.DropDowns" Version="23.2.6" />
14+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.2.6" />
15+
</ItemGroup>
16+
17+
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@page "/counter"
2+
@rendermode InteractiveAuto
3+
4+
<SfComboBox TValue="string" TItem="Games" AllowCustom=true Placeholder="Select a game" PopupHeight="350px" PopupWidth="350px" DataSource="@LocalData">
5+
<ComboBoxFieldSettings Value="ID" Text="Text"></ComboBoxFieldSettings>
6+
</SfComboBox>
7+
8+
@code {
9+
public class Games
10+
{
11+
public string ID { get; set; }
12+
public string Text { get; set; }
13+
}
14+
List<Games> LocalData = new List<Games> {
15+
new Games() { ID= "Game1", Text= "American Football" },
16+
new Games() { ID= "Game2", Text= "Badminton" },
17+
new Games() { ID= "Game3", Text= "Basketball" },
18+
new Games() { ID= "Game4", Text= "Cricket" },
19+
new Games() { ID= "Game5", Text= "Football" },
20+
new Games() { ID= "Game6", Text= "Golf" },
21+
new Games() { ID= "Game7", Text= "Hockey" },
22+
new Games() { ID= "Game8", Text= "Rugby"},
23+
new Games() { ID= "Game9", Text= "Snooker" },
24+
new Games() { ID= "Game10", Text= "Tennis"},
25+
};
26+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
2+
using Syncfusion.Blazor;
3+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
4+
builder.Services.AddSyncfusionBlazor();
5+
await builder.Build().RunAsync();
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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 static Microsoft.AspNetCore.Components.Web.RenderMode
7+
@using Microsoft.AspNetCore.Components.Web.Virtualization
8+
@using Microsoft.JSInterop
9+
@using ComboBoxSample.Client
10+
@using Syncfusion.Blazor
11+
@using Syncfusion.Blazor.DropDowns
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.8.34316.72
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComboBoxSample", "ComboBoxSample\ComboBoxSample.csproj", "{4E784F6B-7A75-4956-86E6-C0DF676FBDC3}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComboBoxSample.Client", "ComboBoxSample.Client\ComboBoxSample.Client.csproj", "{2B61DE17-9003-4EFC-9337-47BC59F7FCAB}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{4E784F6B-7A75-4956-86E6-C0DF676FBDC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{4E784F6B-7A75-4956-86E6-C0DF676FBDC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{4E784F6B-7A75-4956-86E6-C0DF676FBDC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{4E784F6B-7A75-4956-86E6-C0DF676FBDC3}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{2B61DE17-9003-4EFC-9337-47BC59F7FCAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{2B61DE17-9003-4EFC-9337-47BC59F7FCAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{2B61DE17-9003-4EFC-9337-47BC59F7FCAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{2B61DE17-9003-4EFC-9337-47BC59F7FCAB}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {DCB4D520-F116-454D-B0BF-A1BA2D5BAB4D}
30+
EndGlobalSection
31+
EndGlobal
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\ComboBoxSample.Client\ComboBoxSample.Client.csproj" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<base href="/" />
8+
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
9+
<link rel="stylesheet" href="app.css" />
10+
<link rel="stylesheet" href="ComboBoxSample.styles.css" />
11+
<link rel="icon" type="image/png" href="favicon.png" />
12+
<link href="_content/Syncfusion.Blazor.Themes/material.css" rel="stylesheet" />
13+
<HeadOutlet />
14+
</head>
15+
16+
<body>
17+
<Routes />
18+
<script src="_framework/blazor.web.js"></script>
19+
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
20+
</body>
21+
22+
</html>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@inherits LayoutComponentBase
2+
3+
<div class="page">
4+
<div class="sidebar">
5+
<NavMenu />
6+
</div>
7+
8+
<main>
9+
<div class="top-row px-4">
10+
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
11+
</div>
12+
13+
<article class="content px-4">
14+
@Body
15+
</article>
16+
</main>
17+
</div>
18+
19+
<div id="blazor-error-ui">
20+
An unhandled error has occurred.
21+
<a href="" class="reload">Reload</a>
22+
<a class="dismiss">🗙</a>
23+
</div>

0 commit comments

Comments
 (0)