-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from issacimmanuvel-git/918666-UG
918666: UG Revamp
- Loading branch information
Showing
54 changed files
with
2,352 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/App.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@namespace ExpandCollapseIconTemplate | ||
<Router AppAssembly="@typeof(App).Assembly"> | ||
<Found Context="routeData"> | ||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | ||
<FocusOnNavigate RouteData="@routeData" Selector="h1" /> | ||
</Found> | ||
<NotFound> | ||
<PageTitle>Not found</PageTitle> | ||
<LayoutView Layout="@typeof(MainLayout)"> | ||
<p role="alert">Sorry, there's nothing at this address.</p> | ||
</LayoutView> | ||
</NotFound> | ||
</Router> | ||
|
15 changes: 15 additions & 0 deletions
15
...Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/ExpandCollapseIconTemplate_NET6.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Blazor.Diagram" Version="*" /> | ||
<PackageReference Include="Syncfusion.Blazor.Themes" Version="*" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="wwwroot\" /> | ||
</ItemGroup> | ||
</Project> |
15 changes: 15 additions & 0 deletions
15
...Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/ExpandCollapseIconTemplate_NET8.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Blazor.Diagram" Version="*" /> | ||
<PackageReference Include="Syncfusion.Blazor.Themes" Version="*" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="wwwroot\" /> | ||
</ItemGroup> | ||
</Project> |
106 changes: 106 additions & 0 deletions
106
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/Pages/Index.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
@page "/" | ||
|
||
@using Syncfusion.Blazor.Diagram | ||
|
||
<SfDiagramComponent Height="600px" Nodes="@nodes" Connectors="@connectors"> | ||
<DiagramTemplates> | ||
<DiagramExpandIconTemplate> | ||
@{ | ||
<div style="height: 100%; width: 100%"> | ||
<input type="button" value="Collapse" /> | ||
</div> | ||
} | ||
</DiagramExpandIconTemplate> | ||
<DiagramCollapseIconTemplate> | ||
@{ | ||
<div style="height: 100%; width: 100%"> | ||
<input type="button" value="Expand" /> | ||
</div> | ||
} | ||
</DiagramCollapseIconTemplate> | ||
</DiagramTemplates> | ||
</SfDiagramComponent> | ||
|
||
@code { | ||
DiagramObjectCollection<Node> nodes = new DiagramObjectCollection<Node>(); | ||
DiagramObjectCollection<Connector> connectors = new DiagramObjectCollection<Connector>(); | ||
|
||
protected override void OnInitialized() | ||
{ | ||
nodes = new DiagramObjectCollection<Node>(){}; | ||
Node node1 = new Node() | ||
{ | ||
ID = "node1", | ||
Width = 100, | ||
Height = 100, | ||
OffsetX = 300, | ||
OffsetY = 100, | ||
Style = new ShapeStyle() | ||
{ | ||
Fill = "#6BA5D7", | ||
StrokeColor = "white" | ||
}, | ||
Annotations = new DiagramObjectCollection<ShapeAnnotation>() | ||
{ | ||
new ShapeAnnotation() | ||
{ | ||
Content="Node1" | ||
} | ||
}, | ||
ExpandIcon = new DiagramExpandIcon() | ||
{ | ||
Shape = DiagramExpandIcons.Template, | ||
Height = 20, | ||
Width = 20, | ||
}, | ||
CollapseIcon = new DiagramCollapseIcon() | ||
{ | ||
Shape = DiagramCollapseIcons.Template, | ||
Height = 20, | ||
Width = 20, | ||
}, | ||
}; | ||
nodes.Add(node1); | ||
Node node2 = new Node() | ||
{ | ||
ID = "node2", | ||
Width = 100, | ||
Height = 100, | ||
OffsetX = 300, | ||
OffsetY = 400, | ||
Style = new ShapeStyle() | ||
{ | ||
Fill = "#6BA5D7", | ||
StrokeColor = "white" | ||
}, | ||
Annotations = new DiagramObjectCollection<ShapeAnnotation>() | ||
{ | ||
new ShapeAnnotation() | ||
{ | ||
Content="Node2" | ||
} | ||
}, | ||
ExpandIcon = new DiagramExpandIcon() | ||
{ | ||
|
||
Shape = DiagramExpandIcons.Template, | ||
Height = 20, | ||
Width = 20, | ||
}, | ||
CollapseIcon = new DiagramCollapseIcon() | ||
{ | ||
Shape = DiagramCollapseIcons.Template, | ||
Height = 20, | ||
Width = 20, | ||
}, | ||
}; | ||
nodes.Add(node2); | ||
Connector connector1 = new Connector() | ||
{ | ||
ID = "connector1", | ||
SourceID = "node1", | ||
TargetID = "node2", | ||
}; | ||
connectors.Add(connector1); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/Pages/_Host.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@page "/" | ||
@namespace ExpandCollapseIconTemplate.Pages | ||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | ||
@{ | ||
Layout = "_Layout"; | ||
} | ||
|
||
<component type="typeof(App)" render-mode="ServerPrerendered" /> |
24 changes: 24 additions & 0 deletions
24
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/Pages/_Layout.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@using Microsoft.AspNetCore.Components.Web | ||
@namespace ExpandCollapseIconTemplate.Pages | ||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<base href="~/" /> | ||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" /> | ||
<link href="css/site.css" rel="stylesheet" /> | ||
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script> | ||
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" /> | ||
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> | ||
</head> | ||
<body> | ||
@RenderBody() | ||
|
||
|
||
|
||
<script src="_framework/blazor.server.js"></script> | ||
</body> | ||
</html> |
32 changes: 32 additions & 0 deletions
32
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
using Microsoft.AspNetCore.Components; | ||
using Microsoft.AspNetCore.Components.Web; | ||
using Syncfusion.Blazor; | ||
|
||
var builder = WebApplication.CreateBuilder(args); | ||
|
||
// Add services to the container. | ||
builder.Services.AddRazorPages(); | ||
builder.Services.AddServerSideBlazor(); | ||
builder.Services.AddSyncfusionBlazor(); | ||
|
||
var app = builder.Build(); | ||
|
||
// Configure the HTTP request pipeline. | ||
if (!app.Environment.IsDevelopment()) | ||
{ | ||
app.UseExceptionHandler("/Error"); | ||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. | ||
app.UseHsts(); | ||
} | ||
|
||
app.UseHttpsRedirection(); | ||
|
||
app.UseStaticFiles(); | ||
|
||
app.UseRouting(); | ||
|
||
app.MapBlazorHub(); | ||
app.MapFallbackToPage("/_Host"); | ||
|
||
app.Run(); |
28 changes: 28 additions & 0 deletions
28
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/Properties/launchSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:11920", | ||
"sslPort": 44341 | ||
} | ||
}, | ||
"profiles": { | ||
"ExpandCollapseIconTemplate": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:7204;http://localhost:5236", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Template support for Expand/Collapse Icons | ||
|
||
This sample demonstrates how to set template for expand and collapse icons. | ||
|
||
Demo link: | ||
https://blazor.syncfusion.com/demos/diagramcomponent/expandcollapse?theme=fluent | ||
|
||
## Prerequisites | ||
|
||
* Visual Studio 2022 | ||
|
||
## How to run the project | ||
|
||
* Checkout this project to a location in your disk. | ||
* Open the solution file using the Visual Studio 2022. | ||
* Restore the NuGet packages by rebuilding the solution. | ||
* Run the project. |
18 changes: 18 additions & 0 deletions
18
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/Shared/MainLayout.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@namespace ExpandCollapseIconTemplate.Shared | ||
@inherits LayoutComponentBase | ||
|
||
<PageTitle>ExpandCollapseIconTemplate</PageTitle> | ||
|
||
<div class="page"> | ||
<div class="sidebar"> | ||
<NavMenu /> | ||
</div> | ||
|
||
|
||
<main> | ||
|
||
<article class="content px-4"> | ||
@Body | ||
</article> | ||
</main> | ||
</div> |
70 changes: 70 additions & 0 deletions
70
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/Shared/MainLayout.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.page { | ||
position: relative; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
main { | ||
flex: 1; | ||
} | ||
|
||
.sidebar { | ||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); | ||
} | ||
|
||
.top-row { | ||
background-color: #f7f7f7; | ||
border-bottom: 1px solid #d6d5d5; | ||
justify-content: flex-end; | ||
height: 3.5rem; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.top-row ::deep a, .top-row .btn-link { | ||
white-space: nowrap; | ||
margin-left: 1.5rem; | ||
} | ||
|
||
.top-row a:first-child { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
@media (max-width: 640.98px) { | ||
.top-row:not(.auth) { | ||
display: none; | ||
} | ||
|
||
.top-row.auth { | ||
justify-content: space-between; | ||
} | ||
|
||
.top-row a, .top-row .btn-link { | ||
margin-left: 0; | ||
} | ||
} | ||
|
||
@media (min-width: 641px) { | ||
.page { | ||
flex-direction: row; | ||
} | ||
|
||
.sidebar { | ||
width: 250px; | ||
height: 100vh; | ||
position: sticky; | ||
top: 0; | ||
} | ||
|
||
.top-row { | ||
position: sticky; | ||
top: 0; | ||
z-index: 1; | ||
} | ||
|
||
.top-row, article { | ||
padding-left: 2rem !important; | ||
padding-right: 1.5rem !important; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/_Imports.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@using System.Net.Http | ||
@using Microsoft.AspNetCore.Authorization | ||
@using Microsoft.AspNetCore.Components.Authorization | ||
@using Microsoft.AspNetCore.Components.Forms | ||
@using Microsoft.AspNetCore.Components.Routing | ||
@using Microsoft.AspNetCore.Components.Web | ||
@using Microsoft.AspNetCore.Components.Web.Virtualization | ||
@using Microsoft.JSInterop | ||
@using ExpandCollapseIconTemplate | ||
@using ExpandCollapseIconTemplate.Shared |
9 changes: 9 additions & 0 deletions
9
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/appsettings.Development.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"DetailedErrors": true, | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
UG-Samples/Nodes/ExpandAndCollapse/ExpandCollapseIconTemplate/appsettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
}, | ||
"AllowedHosts": "*" | ||
} |
7 changes: 7 additions & 0 deletions
7
...odes/ExpandAndCollapse/ExpandCollapseIconTemplate/wwwroot/css/bootstrap/bootstrap.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
.../ExpandAndCollapse/ExpandCollapseIconTemplate/wwwroot/css/bootstrap/bootstrap.min.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.