Skip to content

Commit 2466dd3

Browse files
Merge pull request #111 from RamyaSubramaniSF4537/ES-892723-UGExamples
Added Example code
2 parents 900b78d + d621ad8 commit 2466dd3

File tree

383 files changed

+16189
-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.

383 files changed

+16189
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@namespace BezierSegmentShape
2+
3+
<Router AppAssembly="@typeof(App).Assembly">
4+
<Found Context="routeData">
5+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
6+
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
7+
</Found>
8+
<NotFound>
9+
<PageTitle>Not found</PageTitle>
10+
<LayoutView Layout="@typeof(MainLayout)">
11+
<p role="alert">Sorry, there's nothing at this address.</p>
12+
</LayoutView>
13+
</NotFound>
14+
</Router>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Syncfusion.Blazor.Diagram" Version="*" />
11+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="*" />
12+
</ItemGroup>
13+
14+
</Project>
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+
<PackageReference Include="Syncfusion.Blazor.Diagram" Version="*" />
11+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="*" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@page "/"
2+
@using Syncfusion.Blazor.Diagram
3+
@using Syncfusion.Blazor.Diagram.Internal
4+
5+
<SfDiagramComponent Width="1000px" Height="500px" Connectors="@connectors" ></SfDiagramComponent>
6+
@code {
7+
//Define the diagram's connector collection.
8+
DiagramObjectCollection<Connector> connectors = new DiagramObjectCollection<Connector>();
9+
protected override void OnInitialized()
10+
{
11+
Connector connector = new Connector()
12+
{
13+
ID = "connector",
14+
SourcePoint = new DiagramPoint() { X = 100, Y = 100 },
15+
TargetPoint = new DiagramPoint() { X = 300, Y =300 },
16+
SourceDecorator = new DecoratorSettings() { Shape = DecoratorShape.Diamond },
17+
Segments = new DiagramObjectCollection<ConnectorSegment>()
18+
{
19+
new BezierSegment(){Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint(){X = 200, Y = 100}
20+
,
21+
},
22+
new BezierSegment(){Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint(){X = 260, Y = 150}}
23+
},
24+
Type = ConnectorSegmentType.Bezier,
25+
BezierConnectorSettings = new BezierConnectorSettings()
26+
{
27+
ControlPointsVisibility = ControlPointsVisibility.All
28+
29+
},
30+
31+
Constraints = ConnectorConstraints.Default | ConnectorConstraints.DragSegmentThumb,
32+
SegmentThumbSettings = new SegmentThumbSettings() { Shape = SegmentThumbShapes.Square },
33+
};
34+
connectors.Add(connector);
35+
36+
}
37+
38+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@page "/"
2+
@namespace BezierSegmentShape.Pages
3+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4+
@{
5+
Layout = "_Layout";
6+
}
7+
8+
<component type="typeof(App)" render-mode="ServerPrerendered" />
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@using Microsoft.AspNetCore.Components.Web
2+
@namespace BezierSegmentShape.Pages
3+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4+
5+
<!DOCTYPE html>
6+
<html lang="en">
7+
<head>
8+
<meta charset="utf-8" />
9+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
10+
<base href="~/" />
11+
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
12+
<link href="css/site.css" rel="stylesheet" />
13+
<link href="BezierSegmentShape.styles.css" rel="stylesheet" />
14+
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
15+
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
16+
17+
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
18+
</head>
19+
<body>
20+
@RenderBody()
21+
22+
<div id="blazor-error-ui">
23+
<environment include="Staging,Production">
24+
An error has occurred. This application may no longer respond until reloaded.
25+
</environment>
26+
<environment include="Development">
27+
An unhandled exception has occurred. See browser dev tools for details.
28+
</environment>
29+
<a href="" class="reload">Reload</a>
30+
<a class="dismiss">🗙</a>
31+
</div>
32+
33+
<script src="_framework/blazor.server.js"></script>
34+
</body>
35+
</html>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Microsoft.AspNetCore.Components;
2+
using Microsoft.AspNetCore.Components.Web;
3+
using Syncfusion.Blazor;
4+
var builder = WebApplication.CreateBuilder(args);
5+
6+
// Add services to the container.
7+
builder.Services.AddRazorPages();
8+
builder.Services.AddServerSideBlazor();
9+
builder.Services.AddSyncfusionBlazor();
10+
11+
12+
var app = builder.Build();
13+
14+
// Configure the HTTP request pipeline.
15+
if (!app.Environment.IsDevelopment())
16+
{
17+
app.UseExceptionHandler("/Error");
18+
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
19+
app.UseHsts();
20+
}
21+
22+
app.UseHttpsRedirection();
23+
24+
app.UseStaticFiles();
25+
26+
app.UseRouting();
27+
28+
app.MapBlazorHub();
29+
app.MapFallbackToPage("/_Host");
30+
31+
app.Run();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:46825",
7+
"sslPort": 44390
8+
}
9+
},
10+
"profiles": {
11+
"BezierSegmentShape": {
12+
"commandName": "Project",
13+
"dotnetRunMessages": true,
14+
"launchBrowser": true,
15+
"applicationUrl": "https://localhost:7136;http://localhost:5178",
16+
"environmentVariables": {
17+
"ASPNETCORE_ENVIRONMENT": "Development"
18+
}
19+
},
20+
"IIS Express": {
21+
"commandName": "IISExpress",
22+
"launchBrowser": true,
23+
"environmentVariables": {
24+
"ASPNETCORE_ENVIRONMENT": "Development"
25+
}
26+
}
27+
}
28+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@namespace BezierSegmentShape.Shared
2+
@inherits LayoutComponentBase
3+
4+
<PageTitle>BezierSegmentShape</PageTitle>
5+
6+
<div class="page">
7+
<div class="sidebar">
8+
9+
</div>
10+
11+
<main>
12+
<div class="top-row px-4">
13+
</div>
14+
15+
<article class="content px-4">
16+
@Body
17+
</article>
18+
</main>
19+
</div>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
.page {
2+
position: relative;
3+
display: flex;
4+
flex-direction: column;
5+
}
6+
7+
main {
8+
flex: 1;
9+
}
10+
11+
.sidebar {
12+
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
13+
}
14+
15+
.top-row {
16+
background-color: #f7f7f7;
17+
border-bottom: 1px solid #d6d5d5;
18+
justify-content: flex-end;
19+
height: 3.5rem;
20+
display: flex;
21+
align-items: center;
22+
}
23+
24+
.top-row ::deep a, .top-row .btn-link {
25+
white-space: nowrap;
26+
margin-left: 1.5rem;
27+
}
28+
29+
.top-row a:first-child {
30+
overflow: hidden;
31+
text-overflow: ellipsis;
32+
}
33+
34+
@media (max-width: 640.98px) {
35+
.top-row:not(.auth) {
36+
display: none;
37+
}
38+
39+
.top-row.auth {
40+
justify-content: space-between;
41+
}
42+
43+
.top-row a, .top-row .btn-link {
44+
margin-left: 0;
45+
}
46+
}
47+
48+
@media (min-width: 641px) {
49+
.page {
50+
flex-direction: row;
51+
}
52+
53+
.sidebar {
54+
width: 250px;
55+
height: 100vh;
56+
position: sticky;
57+
top: 0;
58+
}
59+
60+
.top-row {
61+
position: sticky;
62+
top: 0;
63+
z-index: 1;
64+
}
65+
66+
.top-row, article {
67+
padding-left: 2rem !important;
68+
padding-right: 1.5rem !important;
69+
}
70+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="alert alert-secondary mt-4">
2+
<span class="oi oi-pencil me-2" aria-hidden="true"></span>
3+
<strong>@Title</strong>
4+
5+
<span class="text-nowrap">
6+
Please take our
7+
<a target="_blank" class="font-weight-bold link-dark" href="https://go.microsoft.com/fwlink/?linkid=2149017">brief survey</a>
8+
</span>
9+
and tell us what you think.
10+
</div>
11+
12+
@code {
13+
// Demonstrates how a parent component can supply parameters
14+
[Parameter]
15+
public string? Title { get; set; }
16+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@using System.Net.Http
2+
@using Microsoft.AspNetCore.Authorization
3+
@using Microsoft.AspNetCore.Components.Authorization
4+
@using Microsoft.AspNetCore.Components.Forms
5+
@using Microsoft.AspNetCore.Components.Routing
6+
@using Microsoft.AspNetCore.Components.Web
7+
@using Microsoft.AspNetCore.Components.Web.Virtualization
8+
@using Microsoft.JSInterop
9+
@using BezierSegmentShape
10+
@using BezierSegmentShape.Shared
11+
@using Syncfusion.Blazor;
12+
@using Syncfusion.Blazor.Diagram;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"DetailedErrors": true,
3+
"Logging": {
4+
"LogLevel": {
5+
"Default": "Information",
6+
"Microsoft.AspNetCore": "Warning"
7+
}
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*"
9+
}

UG-Samples/Connectors/Segments/Bezier/BezierSegmentShape/BezierSegmentShape/wwwroot/css/bootstrap/bootstrap.min.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UG-Samples/Connectors/Segments/Bezier/BezierSegmentShape/BezierSegmentShape/wwwroot/css/bootstrap/bootstrap.min.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)