Skip to content

933104 : Sample commit for Blazor File Manager component with controller. #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Syncfusion.Blazor.Buttons" Version="23.2.6" />
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.2.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.2" />
<PackageReference Include="Syncfusion.Blazor.Buttons" Version="28.2.12" />
<PackageReference Include="Syncfusion.Blazor.Themes" Version="28.2.12" />
</ItemGroup>

</Project>
38 changes: 19 additions & 19 deletions Chip/BlazorWebApp/ChipSample/ChipSample.Client/Pages/Counter.razor
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@
public List<ChipCollection> ChipData = new List<ChipCollection>();
public class ChipCollection
{
public string text { get; set; }
public string? text { get; set; }
public bool enabled { get; set; }
}
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await Task.Delay(2000);
ChipData.Add(new ChipCollection
{
text = "Jenifer",
enabled = true
});
{
text = "Jenifer",
enabled = true
});
ChipData.Add(new ChipCollection
{
text = "Amenda",
enabled = true
});
{
text = "Amenda",
enabled = true
});
ChipData.Add(new ChipCollection
{
text = "Isabella",
enabled = true
});
{
text = "Isabella",
enabled = true
});
ChipData.Add(new ChipCollection
{
text = "James",
enabled = true
});
{
text = "James",
enabled = true
});

}
}
}

3 changes: 2 additions & 1 deletion Chip/BlazorWebApp/ChipSample/ChipSample.Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Syncfusion.Blazor;

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.Services.AddSyncfusionBlazor();
await builder.Build().RunAsync();
24 changes: 12 additions & 12 deletions Chip/BlazorWebApp/ChipSample/ChipSample.sln
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34316.72
VisualStudioVersion = 17.14.35906.104 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChipSample", "ChipSample\ChipSample.csproj", "{A16A3CA7-F804-46E5-BCF4-3BBFBD4DA86E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChipSample", "ChipSample\ChipSample.csproj", "{B0B72CD0-DADF-4C58-9E28-0D2235D80C54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChipSample.Client", "ChipSample.Client\ChipSample.Client.csproj", "{12C90F37-829A-4617-828E-BC6736202FC8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChipSample.Client", "ChipSample.Client\ChipSample.Client.csproj", "{E1BAF505-570E-455E-BA71-5A740E851B0E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A16A3CA7-F804-46E5-BCF4-3BBFBD4DA86E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A16A3CA7-F804-46E5-BCF4-3BBFBD4DA86E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A16A3CA7-F804-46E5-BCF4-3BBFBD4DA86E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A16A3CA7-F804-46E5-BCF4-3BBFBD4DA86E}.Release|Any CPU.Build.0 = Release|Any CPU
{12C90F37-829A-4617-828E-BC6736202FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12C90F37-829A-4617-828E-BC6736202FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12C90F37-829A-4617-828E-BC6736202FC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12C90F37-829A-4617-828E-BC6736202FC8}.Release|Any CPU.Build.0 = Release|Any CPU
{B0B72CD0-DADF-4C58-9E28-0D2235D80C54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0B72CD0-DADF-4C58-9E28-0D2235D80C54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0B72CD0-DADF-4C58-9E28-0D2235D80C54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0B72CD0-DADF-4C58-9E28-0D2235D80C54}.Release|Any CPU.Build.0 = Release|Any CPU
{E1BAF505-570E-455E-BA71-5A740E851B0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1BAF505-570E-455E-BA71-5A740E851B0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1BAF505-570E-455E-BA71-5A740E851B0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1BAF505-570E-455E-BA71-5A740E851B0E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EDEAE09D-B66C-4519-8E42-C9735AD49F8F}
SolutionGuid = {4E018E96-AABC-4D67-BDEE-E3E370F662A7}
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions Chip/BlazorWebApp/ChipSample/ChipSample/ChipSample.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ChipSample.Client\ChipSample.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.2" />
</ItemGroup>

</Project>
9 changes: 5 additions & 4 deletions Chip/BlazorWebApp/ChipSample/ChipSample/Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="ChipSample.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="stylesheet" href="@Assets["lib/bootstrap/dist/css/bootstrap.min.css"]" />
<link rel="stylesheet" href="@Assets["app.css"]" />
<link rel="stylesheet" href="@Assets["ChipSample.styles.css"]" />
<link href="_content/Syncfusion.Blazor.Themes/material.css" rel="stylesheet" />
<ImportMap />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet />
</head>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</main>
</div>

<div id="blazor-error-ui">
<div id="blazor-error-ui" data-nosnippet>
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
<a href="." class="reload">Reload</a>
<span class="dismiss">🗙</span>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ main {
}

#blazor-error-ui {
color-scheme: light only;
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
box-sizing: border-box;
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />

<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
<nav class="flex-column">
<nav class="nav flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

.top-row {
height: 3.5rem;
min-height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

<h1>Hello, world!</h1>

Welcome to your new app.
Welcome to your new app.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ else
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th aria-label="Temperature in Celsius">Temp. (C)</th>
<th aria-label="Temperature in Farenheit">Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(Client._Imports).Assembly }">
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(Client._Imports).Assembly }">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
<FocusOnNavigate RouteData="routeData" Selector="h1" />
</Found>
</Router>
8 changes: 5 additions & 3 deletions Chip/BlazorWebApp/ChipSample/ChipSample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ChipSample.Client.Pages;
using ChipSample.Client.Pages;
using ChipSample.Components;
using Syncfusion.Blazor;

Expand All @@ -9,6 +9,7 @@
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
builder.Services.AddSyncfusionBlazor();

var app = builder.Build();

// Configure the HTTP request pipeline.
Expand All @@ -25,12 +26,13 @@

app.UseHttpsRedirection();

app.UseStaticFiles();

app.UseAntiforgery();

app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Counter).Assembly);
.AddAdditionalAssemblies(typeof(ChipSample.Client._Imports).Assembly);

app.Run();
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:21495",
"sslPort": 44386
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5025",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
"profiles": {
"http": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7001;http://localhost:5025",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
"dotnetRunMessages": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5133"
},
"https": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
"dotnetRunMessages": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7133;http://localhost:5133"
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55083/",
"sslPort": 44374
}
}
}
9 changes: 9 additions & 0 deletions Chip/BlazorWebApp/ChipSample/ChipSample/wwwroot/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@ h1:focus {
.darker-border-checkbox.form-check-input {
border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
color: var(--bs-secondary-color);
text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
text-align: start;
}
Loading