Skip to content

Commit d35bc91

Browse files
authored
Added the project files
1 parent 612f921 commit d35bc91

Some content is hidden

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

42 files changed

+1668
-0
lines changed

BlazorWASAM-Multi-Column.sln

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29521.150
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWASAM-Multi-Column.Server", "Server\BlazorWASAM-Multi-Column.Server.csproj", "{2C4F8372-3B60-4A84-B0B7-9CB3EA2318E3}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWASAM-Multi-Column.Client", "Client\BlazorWASAM-Multi-Column.Client.csproj", "{4E092DBA-07AA-4DD6-97E4-54AC54888C91}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWASAM-Multi-Column.Shared", "Shared\BlazorWASAM-Multi-Column.Shared.csproj", "{94E990F3-62C6-429B-9B9D-30F5E703DD32}"
11+
EndProject
12+
Global
13+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
14+
Debug|Any CPU = Debug|Any CPU
15+
Release|Any CPU = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{2C4F8372-3B60-4A84-B0B7-9CB3EA2318E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{2C4F8372-3B60-4A84-B0B7-9CB3EA2318E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{2C4F8372-3B60-4A84-B0B7-9CB3EA2318E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{2C4F8372-3B60-4A84-B0B7-9CB3EA2318E3}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{4E092DBA-07AA-4DD6-97E4-54AC54888C91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{4E092DBA-07AA-4DD6-97E4-54AC54888C91}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{4E092DBA-07AA-4DD6-97E4-54AC54888C91}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{4E092DBA-07AA-4DD6-97E4-54AC54888C91}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{94E990F3-62C6-429B-9B9D-30F5E703DD32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{94E990F3-62C6-429B-9B9D-30F5E703DD32}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{94E990F3-62C6-429B-9B9D-30F5E703DD32}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{94E990F3-62C6-429B-9B9D-30F5E703DD32}.Release|Any CPU.Build.0 = Release|Any CPU
30+
EndGlobalSection
31+
GlobalSection(SolutionProperties) = preSolution
32+
HideSolutionNode = FALSE
33+
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {3C12A0A7-A4CC-4D5A-9116-0A66496EF811}
36+
EndGlobalSection
37+
EndGlobal

Client/App.razor

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Router AppAssembly="@typeof(Program).Assembly">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
</Found>
5+
<NotFound>
6+
<LayoutView Layout="@typeof(MainLayout)">
7+
<p>Sorry, there's nothing at this address.</p>
8+
</LayoutView>
9+
</NotFound>
10+
</Router>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.1</TargetFramework>
5+
<RazorLangVersion>3.0</RazorLangVersion>
6+
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" PrivateAssets="all" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" PrivateAssets="all" />
13+
<PackageReference Include="Syncfusion.Blazor" Version="18.1.0.53" />
14+
<PackageReference Include="System.Net.Http.Json" Version="3.2.0" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<ProjectReference Include="..\Shared\BlazorWASAM-Multi-Column.Shared.csproj" />
19+
</ItemGroup>
20+
21+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ShowAllFiles>true</ShowAllFiles>
5+
</PropertyGroup>
6+
</Project>

Client/Pages/Counter.razor

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@page "/counter"
2+
3+
<h1>Counter</h1>
4+
5+
<p>Current count: @currentCount</p>
6+
7+
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
8+
9+
@code {
10+
private int currentCount = 0;
11+
12+
private void IncrementCount()
13+
{
14+
currentCount++;
15+
}
16+
}

Client/Pages/FetchData.razor

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
@page "/fetchdata"
2+
@using BlazorWASAM_Multi_Column.Shared
3+
@inject HttpClient Http
4+
5+
<h1>Weather forecast</h1>
6+
7+
<p>This component demonstrates fetching data from the server.</p>
8+
9+
@if (forecasts == null)
10+
{
11+
<p><em>Loading...</em></p>
12+
}
13+
else
14+
{
15+
<table class="table">
16+
<thead>
17+
<tr>
18+
<th>Date</th>
19+
<th>Temp. (C)</th>
20+
<th>Temp. (F)</th>
21+
<th>Summary</th>
22+
</tr>
23+
</thead>
24+
<tbody>
25+
@foreach (var forecast in forecasts)
26+
{
27+
<tr>
28+
<td>@forecast.Date.ToShortDateString()</td>
29+
<td>@forecast.TemperatureC</td>
30+
<td>@forecast.TemperatureF</td>
31+
<td>@forecast.Summary</td>
32+
</tr>
33+
}
34+
</tbody>
35+
</table>
36+
}
37+
38+
@code {
39+
private WeatherForecast[] forecasts;
40+
41+
protected override async Task OnInitializedAsync()
42+
{
43+
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecast");
44+
}
45+
46+
}

Client/Pages/Index.razor

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@page "/"
2+
@using Syncfusion.Blazor
3+
@using Syncfusion.Blazor.DropDowns
4+
@using Syncfusion.Blazor.Data
5+
@using BlazorWASAM_Multi_Column.Shared;
6+
@inject HttpClient Http
7+
8+
<h1>Multi-column ComboBox!</h1>
9+
10+
Welcome to your new app.
11+
12+
<div id="ControlRegion">
13+
<div class="control-section col-lg-12">
14+
<div id="remote-data" class="col-lg-6">
15+
<div class="content">
16+
<SfComboBox TValue="string" TItem="Product" PopupWidth="700px" DataSource="@_productsList" PopupHeight="400px" CssClass="e-multi-column" Placeholder="Select a Product">
17+
<ComboBoxTemplates TItem="Product">
18+
<HeaderTemplate>
19+
<table><tr><th class="e-text-center">Product ID</th><th width="240px">Product Name</th><th>Unit Price</th><th>Units In Stock</th><th>Units On Order</th></tr></table>
20+
</HeaderTemplate>
21+
<ItemTemplate>
22+
<table><tbody><tr><td class="e-text-center">@((context as Product).ProductID)</td><td width="240px">@((context as Product).ProductName)</td><td>@((context as Product).UnitPrice)</td><td>@((context as Product).UnitsInStock)</td><td>@((context as Product).UnitsOnOrder)</td></tr> </tbody></table>
23+
</ItemTemplate>
24+
</ComboBoxTemplates>
25+
<ComboBoxFieldSettings Text="ProductName" Value="ProductID"></ComboBoxFieldSettings>
26+
</SfComboBox>
27+
</div>
28+
</div>
29+
</div>
30+
</div>
31+
32+
@code{
33+
34+
private Product[] _productsList;
35+
36+
protected override async Task OnInitializedAsync()
37+
{
38+
_productsList = await Http.GetFromJsonAsync<Product[]>("Product");
39+
}
40+
}

Client/Program.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Net.Http;
3+
using System.Collections.Generic;
4+
using System.Threading.Tasks;
5+
using System.Text;
6+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
7+
using Microsoft.Extensions.Configuration;
8+
using Microsoft.Extensions.DependencyInjection;
9+
using Microsoft.Extensions.Logging;
10+
using Syncfusion.Blazor;
11+
12+
namespace BlazorWASAM_Multi_Column.Client
13+
{
14+
public class Program
15+
{
16+
public static async Task Main(string[] args)
17+
{
18+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
19+
builder.RootComponents.Add<App>("app");
20+
builder.Services.AddSyncfusionBlazor();
21+
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
22+
23+
await builder.Build().RunAsync();
24+
}
25+
}
26+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:49767",
7+
"sslPort": 44320
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
15+
"environmentVariables": {
16+
"ASPNETCORE_ENVIRONMENT": "Development"
17+
}
18+
},
19+
"BlazorWASAM-Multi-Column": {
20+
"commandName": "Project",
21+
"launchBrowser": true,
22+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
23+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
24+
"environmentVariables": {
25+
"ASPNETCORE_ENVIRONMENT": "Development"
26+
}
27+
}
28+
}
29+
}

Client/Shared/MainLayout.razor

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@inherits LayoutComponentBase
2+
3+
<div class="sidebar">
4+
<NavMenu />
5+
</div>
6+
7+
<div class="main">
8+
<div class="top-row px-4">
9+
<a href="http://blazor.net" target="_blank" class="ml-md-auto">About</a>
10+
</div>
11+
12+
<div class="content px-4">
13+
@Body
14+
</div>
15+
</div>

0 commit comments

Comments
 (0)