diff --git a/browser/IgBlazorSamples.Client/wwwroot/index.html b/browser/IgBlazorSamples.Client/wwwroot/index.html index 3a45a7f295..4a2dd575ef 100644 --- a/browser/IgBlazorSamples.Client/wwwroot/index.html +++ b/browser/IgBlazorSamples.Client/wwwroot/index.html @@ -236,6 +236,8 @@ + + diff --git a/samples/layouts/tile-manager/actions/App.razor b/samples/layouts/tile-manager/actions/App.razor new file mode 100644 index 0000000000..5b0d458d9c --- /dev/null +++ b/samples/layouts/tile-manager/actions/App.razor @@ -0,0 +1,55 @@ +@using IgniteUI.Blazor.Controls + + + + +
+ + + +

Default Actions

+

This tile has default actions and title.

+
+ +

No Fullscreen Action

+

Fullscreen is disabled via property.

+
+ +

Custom Actions

+ +

Replace the default actions with custom ones, and include extra actions when the tile is maximized.

+
+ + +

Display only custom actions in the header.

+
+ +

Only title

+

Display only title in the header.

+
+ +

Content only.

+
+
+
+ +@code { + private IgbIcon RegisterIconRef { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (this.RegisterIconRef != null && firstRender) + { + await this.RegisterIconRef.EnsureReady(); + const string northEast = ""; + await this.RegisterIconRef.RegisterIconFromTextAsync("north_east", northEast, "material"); + const string southWest = ""; + await this.RegisterIconRef.RegisterIconFromTextAsync("south_west", southWest, "material"); + const string more = ""; + await this.RegisterIconRef.RegisterIconFromTextAsync("more", more, "material"); + const string chart = ""; + await this.RegisterIconRef.RegisterIconFromTextAsync("chart", chart, "material"); + } + } +} \ No newline at end of file diff --git a/samples/layouts/tile-manager/actions/BlazorClientApp.csproj b/samples/layouts/tile-manager/actions/BlazorClientApp.csproj new file mode 100644 index 0000000000..5af637830e --- /dev/null +++ b/samples/layouts/tile-manager/actions/BlazorClientApp.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + 3.0 + Infragistics.Samples + Infragistics.Samples + + + + 1701;1702,IDE0028,BL0005,0219,CS1998 + + + + + + + + + + + + + + diff --git a/samples/layouts/tile-manager/actions/BlazorClientApp.sln b/samples/layouts/tile-manager/actions/BlazorClientApp.sln new file mode 100644 index 0000000000..8e75057474 --- /dev/null +++ b/samples/layouts/tile-manager/actions/BlazorClientApp.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} + EndGlobalSection +EndGlobal diff --git a/samples/layouts/tile-manager/actions/Program.cs b/samples/layouts/tile-manager/actions/Program.cs new file mode 100644 index 0000000000..e842b6c631 --- /dev/null +++ b/samples/layouts/tile-manager/actions/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using IgniteUI.Blazor.Controls; // for registering Ignite UI modules + +namespace Infragistics.Samples +{ + public class Program + { + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + // registering Ignite UI modules + builder.Services.AddIgniteUIBlazor( + typeof(IgbTileManagerModule), + typeof(IgbIconButtonModule), + typeof(IgbButtonModule), + typeof(IgbIconModule) + ); + await builder.Build().RunAsync(); + } + } +} diff --git a/samples/layouts/tile-manager/actions/Properties/launchSettings.json b/samples/layouts/tile-manager/actions/Properties/launchSettings.json new file mode 100644 index 0000000000..468407d277 --- /dev/null +++ b/samples/layouts/tile-manager/actions/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:4200", + "sslPort": 44385 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BlazorClientApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:4200" + } + } +} diff --git a/samples/layouts/tile-manager/actions/README.md b/samples/layouts/tile-manager/actions/README.md new file mode 100644 index 0000000000..a5739fd80c --- /dev/null +++ b/samples/layouts/tile-manager/actions/README.md @@ -0,0 +1,70 @@ + + + +This folder contains implementation of Blazor application with example of Actions feature using [Tile Manager](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-getting-started.html) component. + + + + + + + View Docs + + + View Code + + + Run Sample + + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-blazor-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-blazor-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Setup + +- instal **.NET SDK** from this [website](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/install) + +## Running App in Visual Studio 2022 + +NOTE: VS 2022 has better code highlighting and error detection than VS Code does. + +- open **Visual Studio 2022** as an administrator + +- open the **BlazorClientApp.sln** solution + +- right click solution and select **Restore NuGet Packages** menu item + +- click **Debug** menu and select **Start Debugging** or press **F5** key + + +## Running App in VS Code + +- open **VS Code** as an administrator + +- open this folder in **VS Code** + +- open a terminal window + +- to restore assemblies, run this command: +```dotnet restore``` + +- to run samples, run this command: +```dotnet watch run``` + +- wait for for message: +**Now listening on: http://localhost:4200** + +- open **http://localhost:4200** in your browser + + +## Resources + +- [Razor Component Models](https://www.codemag.com/article/1911052) +- [Razor Syntax](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#razor-syntax) +- [Getting reference to components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#capture-references-to-components) diff --git a/samples/layouts/tile-manager/actions/_Imports.razor b/samples/layouts/tile-manager/actions/_Imports.razor new file mode 100644 index 0000000000..b4bad03986 --- /dev/null +++ b/samples/layouts/tile-manager/actions/_Imports.razor @@ -0,0 +1,8 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using Infragistics.Samples diff --git a/samples/layouts/tile-manager/actions/wwwroot/actions.js b/samples/layouts/tile-manager/actions/wwwroot/actions.js new file mode 100644 index 0000000000..f3ab9492a3 --- /dev/null +++ b/samples/layouts/tile-manager/actions/wwwroot/actions.js @@ -0,0 +1,64 @@ +window.customOneClick = (event) => { + const tile = event.target.closest('igc-tile'); + + if (tile) { + tile.maximized = !tile.maximized; + + const actionsSlot = tile.querySelector('[slot="actions"]'); + const currentBtn = event.target; + + if (currentBtn) { + if (tile.maximized) { + currentBtn.setAttribute('name', 'south_west'); + currentBtn.setAttribute('aria-label', 'collapse'); + + const chartBtn = document.createElement('igc-icon-button'); + chartBtn.classList.add('additional-action'); + chartBtn.setAttribute('slot', 'actions'); + chartBtn.setAttribute('variant', 'flat'); + chartBtn.setAttribute('collection', 'material'); + chartBtn.setAttribute('name', 'chart'); + chartBtn.setAttribute('aria-label', 'chart'); + + const moreBtn = document.createElement('igc-icon-button'); + moreBtn.classList.add('additional-action'); + moreBtn.setAttribute('slot', 'actions'); + moreBtn.setAttribute('variant', 'flat'); + moreBtn.setAttribute('collection', 'material'); + moreBtn.setAttribute('name', 'more'); + moreBtn.setAttribute('aria-label', 'more'); + + tile.append(chartBtn); + tile.append(moreBtn); + } else { + currentBtn.setAttribute('name', 'north_east'); + currentBtn.setAttribute('aria-label', 'expand'); + + const additionalButtons = + actionsSlot.parentElement?.querySelectorAll('.additional-action'); + additionalButtons?.forEach((btn) => btn.remove()); + } + } + } +}; + +window.customTwoClick = (event) => { + const tile = event.target.closest('igc-tile'); + + if (tile) { + tile.maximized = !tile.maximized; + + const currentBtn = event.target; + + if (currentBtn) { + if (tile.maximized) { + currentBtn.setAttribute('name', 'south_west'); + currentBtn.setAttribute('aria-label', 'collapse'); + } + else { + currentBtn.setAttribute('name', 'north_east'); + currentBtn.setAttribute('aria-label', 'expand'); + } + } + } +}; diff --git a/samples/layouts/tile-manager/actions/wwwroot/index.css b/samples/layouts/tile-manager/actions/wwwroot/index.css new file mode 100644 index 0000000000..8da172bb87 --- /dev/null +++ b/samples/layouts/tile-manager/actions/wwwroot/index.css @@ -0,0 +1,4 @@ +/* +CSS styles are loaded from the shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ \ No newline at end of file diff --git a/samples/layouts/tile-manager/actions/wwwroot/index.html b/samples/layouts/tile-manager/actions/wwwroot/index.html new file mode 100644 index 0000000000..79eafa30fc --- /dev/null +++ b/samples/layouts/tile-manager/actions/wwwroot/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + Samples | IgniteUI for Blazor | Infragistics + + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + + diff --git a/samples/layouts/tile-manager/actions/wwwroot/layout.css b/samples/layouts/tile-manager/actions/wwwroot/layout.css new file mode 100644 index 0000000000..5575faed5d --- /dev/null +++ b/samples/layouts/tile-manager/actions/wwwroot/layout.css @@ -0,0 +1,23 @@ +igc-tile-manager { + margin-bottom: 5px; +} + +igc-tile:nth-child(n + 3):nth-child(-n + 4)::part(actions) { + padding: 13px 16px; +} + +igc-tile:nth-child(n+3)::part(header) { + padding: 0px; +} + +igc-tile:nth-child(5)::part(header) { + padding: 18px 0 18px 0; +} + +p, igc-tile:nth-child(3) h3, igc-tile:nth-child(5) h3 { + margin-left: 20px; +} + +igc-tile:nth-last-child(1) p { + margin-top: 30px; +} diff --git a/samples/layouts/tile-manager/columngap/App.razor b/samples/layouts/tile-manager/columngap/App.razor new file mode 100644 index 0000000000..d5f8061058 --- /dev/null +++ b/samples/layouts/tile-manager/columngap/App.razor @@ -0,0 +1,59 @@ +@using IgniteUI.Blazor.Controls + + + +
+
+ + +
+ + +
+ picture +
+
+ +
+ picture +
+
+ +
+ picture +
+
+ +
+ picture +
+
+ +
+ picture +
+
+ +
+ picture +
+
+
+
+ +@code { + private IgbTileManager TileManagerRef { get; set; } + private string GapValue = "10px"; + + public void OnInputChangeColumn(IgbComponentValueChangedEventArgs e) + { + double value; + double.TryParse(e.Detail, out value); + this.TileManagerRef.ColumnCount = value; + } + + public void OnInputChangeGap(IgbComponentValueChangedEventArgs e) + { + GapValue = e.Detail; + } +} \ No newline at end of file diff --git a/samples/layouts/tile-manager/columngap/BlazorClientApp.csproj b/samples/layouts/tile-manager/columngap/BlazorClientApp.csproj new file mode 100644 index 0000000000..5af637830e --- /dev/null +++ b/samples/layouts/tile-manager/columngap/BlazorClientApp.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + 3.0 + Infragistics.Samples + Infragistics.Samples + + + + 1701;1702,IDE0028,BL0005,0219,CS1998 + + + + + + + + + + + + + + diff --git a/samples/layouts/tile-manager/columngap/BlazorClientApp.sln b/samples/layouts/tile-manager/columngap/BlazorClientApp.sln new file mode 100644 index 0000000000..8e75057474 --- /dev/null +++ b/samples/layouts/tile-manager/columngap/BlazorClientApp.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} + EndGlobalSection +EndGlobal diff --git a/samples/layouts/tile-manager/columngap/Program.cs b/samples/layouts/tile-manager/columngap/Program.cs new file mode 100644 index 0000000000..01569b96b3 --- /dev/null +++ b/samples/layouts/tile-manager/columngap/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using IgniteUI.Blazor.Controls; // for registering Ignite UI modules + +namespace Infragistics.Samples +{ + public class Program + { + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + // registering Ignite UI modules + builder.Services.AddIgniteUIBlazor( + typeof(IgbTileManagerModule), + typeof(IgbInputModule) + ); + await builder.Build().RunAsync(); + } + } +} diff --git a/samples/layouts/tile-manager/columngap/Properties/launchSettings.json b/samples/layouts/tile-manager/columngap/Properties/launchSettings.json new file mode 100644 index 0000000000..468407d277 --- /dev/null +++ b/samples/layouts/tile-manager/columngap/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:4200", + "sslPort": 44385 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BlazorClientApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:4200" + } + } +} diff --git a/samples/layouts/tile-manager/columngap/README.md b/samples/layouts/tile-manager/columngap/README.md new file mode 100644 index 0000000000..258ebe19f0 --- /dev/null +++ b/samples/layouts/tile-manager/columngap/README.md @@ -0,0 +1,70 @@ + + + +This folder contains implementation of Blazor application with example of Columngap feature using [Tile Manager](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-getting-started.html) component. + + + + + + + View Docs + + + View Code + + + Run Sample + + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-blazor-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-blazor-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Setup + +- instal **.NET SDK** from this [website](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/install) + +## Running App in Visual Studio 2022 + +NOTE: VS 2022 has better code highlighting and error detection than VS Code does. + +- open **Visual Studio 2022** as an administrator + +- open the **BlazorClientApp.sln** solution + +- right click solution and select **Restore NuGet Packages** menu item + +- click **Debug** menu and select **Start Debugging** or press **F5** key + + +## Running App in VS Code + +- open **VS Code** as an administrator + +- open this folder in **VS Code** + +- open a terminal window + +- to restore assemblies, run this command: +```dotnet restore``` + +- to run samples, run this command: +```dotnet watch run``` + +- wait for for message: +**Now listening on: http://localhost:4200** + +- open **http://localhost:4200** in your browser + + +## Resources + +- [Razor Component Models](https://www.codemag.com/article/1911052) +- [Razor Syntax](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#razor-syntax) +- [Getting reference to components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#capture-references-to-components) diff --git a/samples/layouts/tile-manager/columngap/_Imports.razor b/samples/layouts/tile-manager/columngap/_Imports.razor new file mode 100644 index 0000000000..b4bad03986 --- /dev/null +++ b/samples/layouts/tile-manager/columngap/_Imports.razor @@ -0,0 +1,8 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using Infragistics.Samples diff --git a/samples/layouts/tile-manager/columngap/wwwroot/index.css b/samples/layouts/tile-manager/columngap/wwwroot/index.css new file mode 100644 index 0000000000..8da172bb87 --- /dev/null +++ b/samples/layouts/tile-manager/columngap/wwwroot/index.css @@ -0,0 +1,4 @@ +/* +CSS styles are loaded from the shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ \ No newline at end of file diff --git a/samples/layouts/tile-manager/columngap/wwwroot/index.html b/samples/layouts/tile-manager/columngap/wwwroot/index.html new file mode 100644 index 0000000000..79eafa30fc --- /dev/null +++ b/samples/layouts/tile-manager/columngap/wwwroot/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + Samples | IgniteUI for Blazor | Infragistics + + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + + diff --git a/samples/layouts/tile-manager/columngap/wwwroot/layout.css b/samples/layouts/tile-manager/columngap/wwwroot/layout.css new file mode 100644 index 0000000000..997a1efd3c --- /dev/null +++ b/samples/layouts/tile-manager/columngap/wwwroot/layout.css @@ -0,0 +1,25 @@ +p { + font-size: 20px; + padding: 10px; +} + +.sample { + overflow: auto; +} + +igc-input { + width: min-content; + --ig-size: var(--ig-size-small); + margin-right: 50px; +} + +img { + height: 100%; + width: 100%; +} + +.inputWrapper { + display: flex; + margin-left: 22px; + margin-bottom: 12px; +} diff --git a/samples/layouts/tile-manager/dragndrop/App.razor b/samples/layouts/tile-manager/dragndrop/App.razor new file mode 100644 index 0000000000..fd9614639b --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/App.razor @@ -0,0 +1,55 @@ +@using IgniteUI.Blazor.Controls + + + +
+
+ + Tile-header + Tile + None + +
+ + + Tile 1 header +

Content for Tile 1

+
+ + Tile 2 header +

Content for Tile 2

+
+ + Tile 3 header +

Content for Tile 3

+
+ + Tile 4 header +

Content for Tile 4

+
+
+
+ +@code { + private IgbTileManager TileManagerRef { get; set; } + private TileManagerDragMode DragMode = TileManagerDragMode.TileHeader; + + public void OnRadioButtonClick(IgbRadioChangeEventArgs e) + { + if (this.TileManagerRef != null) + { + switch (e.Detail.Value) + { + case "TileHeader": + this.DragMode = TileManagerDragMode.TileHeader; + break; + case "Tile": + this.DragMode = TileManagerDragMode.Tile; + break; + case "None": + this.DragMode = TileManagerDragMode.None; + break; + } + } + } +} \ No newline at end of file diff --git a/samples/layouts/tile-manager/dragndrop/BlazorClientApp.csproj b/samples/layouts/tile-manager/dragndrop/BlazorClientApp.csproj new file mode 100644 index 0000000000..5af637830e --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/BlazorClientApp.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + 3.0 + Infragistics.Samples + Infragistics.Samples + + + + 1701;1702,IDE0028,BL0005,0219,CS1998 + + + + + + + + + + + + + + diff --git a/samples/layouts/tile-manager/dragndrop/BlazorClientApp.sln b/samples/layouts/tile-manager/dragndrop/BlazorClientApp.sln new file mode 100644 index 0000000000..8e75057474 --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/BlazorClientApp.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} + EndGlobalSection +EndGlobal diff --git a/samples/layouts/tile-manager/dragndrop/Program.cs b/samples/layouts/tile-manager/dragndrop/Program.cs new file mode 100644 index 0000000000..8da70acdd6 --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/Program.cs @@ -0,0 +1,30 @@ +using System; +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using IgniteUI.Blazor.Controls; // for registering Ignite UI modules + +namespace Infragistics.Samples +{ + public class Program + { + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + // registering Ignite UI modules + builder.Services.AddIgniteUIBlazor( + typeof(IgbTileManagerModule), + typeof(IgbRadioModule), + typeof(IgbRadioGroupModule) + ); + await builder.Build().RunAsync(); + } + } +} diff --git a/samples/layouts/tile-manager/dragndrop/Properties/launchSettings.json b/samples/layouts/tile-manager/dragndrop/Properties/launchSettings.json new file mode 100644 index 0000000000..468407d277 --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:4200", + "sslPort": 44385 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BlazorClientApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:4200" + } + } +} diff --git a/samples/layouts/tile-manager/dragndrop/README.md b/samples/layouts/tile-manager/dragndrop/README.md new file mode 100644 index 0000000000..9b0ee6b6b7 --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/README.md @@ -0,0 +1,70 @@ + + + +This folder contains implementation of Blazor application with example of Dragndrop feature using [Tile Manager](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-getting-started.html) component. + + + + + + + View Docs + + + View Code + + + Run Sample + + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-blazor-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-blazor-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Setup + +- instal **.NET SDK** from this [website](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/install) + +## Running App in Visual Studio 2022 + +NOTE: VS 2022 has better code highlighting and error detection than VS Code does. + +- open **Visual Studio 2022** as an administrator + +- open the **BlazorClientApp.sln** solution + +- right click solution and select **Restore NuGet Packages** menu item + +- click **Debug** menu and select **Start Debugging** or press **F5** key + + +## Running App in VS Code + +- open **VS Code** as an administrator + +- open this folder in **VS Code** + +- open a terminal window + +- to restore assemblies, run this command: +```dotnet restore``` + +- to run samples, run this command: +```dotnet watch run``` + +- wait for for message: +**Now listening on: http://localhost:4200** + +- open **http://localhost:4200** in your browser + + +## Resources + +- [Razor Component Models](https://www.codemag.com/article/1911052) +- [Razor Syntax](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#razor-syntax) +- [Getting reference to components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#capture-references-to-components) diff --git a/samples/layouts/tile-manager/dragndrop/_Imports.razor b/samples/layouts/tile-manager/dragndrop/_Imports.razor new file mode 100644 index 0000000000..b4bad03986 --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/_Imports.razor @@ -0,0 +1,8 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using Infragistics.Samples diff --git a/samples/layouts/tile-manager/dragndrop/wwwroot/index.css b/samples/layouts/tile-manager/dragndrop/wwwroot/index.css new file mode 100644 index 0000000000..8da172bb87 --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/wwwroot/index.css @@ -0,0 +1,4 @@ +/* +CSS styles are loaded from the shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ \ No newline at end of file diff --git a/samples/layouts/tile-manager/dragndrop/wwwroot/index.html b/samples/layouts/tile-manager/dragndrop/wwwroot/index.html new file mode 100644 index 0000000000..79eafa30fc --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/wwwroot/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + Samples | IgniteUI for Blazor | Infragistics + + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + + diff --git a/samples/layouts/tile-manager/dragndrop/wwwroot/layout.css b/samples/layouts/tile-manager/dragndrop/wwwroot/layout.css new file mode 100644 index 0000000000..228013f3bf --- /dev/null +++ b/samples/layouts/tile-manager/dragndrop/wwwroot/layout.css @@ -0,0 +1,30 @@ +span { + font-size: 30px; +} + +igc-tile::part(header) { + border-bottom: 2px solid var(--ig-primary-700); +} + +p { + font-size: 18px; + margin-left: 20px; + padding-top: 10px; +} + +igc-radio-group { + margin-left: 22px; + width: fit-content; + padding: 4px 15px; + margin-bottom: 8px; + border: 2px solid var(--ig-primary-700); + background-color: var(--ig-gray-300); +} + +igc-tile::part(dragging) { + color: yellow; +} + +.radioWrapper { + display: flex; +} diff --git a/samples/layouts/tile-manager/layout/App.razor b/samples/layouts/tile-manager/layout/App.razor new file mode 100644 index 0000000000..fa03c8cb8d --- /dev/null +++ b/samples/layouts/tile-manager/layout/App.razor @@ -0,0 +1,46 @@ +@using IgniteUI.Blazor.Controls + + + + +
+
+ Save Layout + Load Layout + Add Tile + Remove Tile +
+ + + Tile 1 header +

Content for Tile 1

+
+ + Tile 2 header +

Content for Tile 2

+
+ + Tile 3 header +

Content for Tile 3

+
+ + Tile 4 header +

Content for Tile 4

+
+
+
+ +@code { + private IgbTileManager TileManagerRef { get; set; } + private string SerializeData; + + public void SaveLayout() + { + this.SerializeData = this.TileManagerRef.SaveLayout(); + } + + public void LoadLayout() + { + this.TileManagerRef.LoadLayout(SerializeData); + } +} \ No newline at end of file diff --git a/samples/layouts/tile-manager/layout/BlazorClientApp.csproj b/samples/layouts/tile-manager/layout/BlazorClientApp.csproj new file mode 100644 index 0000000000..5af637830e --- /dev/null +++ b/samples/layouts/tile-manager/layout/BlazorClientApp.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + 3.0 + Infragistics.Samples + Infragistics.Samples + + + + 1701;1702,IDE0028,BL0005,0219,CS1998 + + + + + + + + + + + + + + diff --git a/samples/layouts/tile-manager/layout/BlazorClientApp.sln b/samples/layouts/tile-manager/layout/BlazorClientApp.sln new file mode 100644 index 0000000000..8e75057474 --- /dev/null +++ b/samples/layouts/tile-manager/layout/BlazorClientApp.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} + EndGlobalSection +EndGlobal diff --git a/samples/layouts/tile-manager/layout/Program.cs b/samples/layouts/tile-manager/layout/Program.cs new file mode 100644 index 0000000000..59c7941db0 --- /dev/null +++ b/samples/layouts/tile-manager/layout/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using IgniteUI.Blazor.Controls; // for registering Ignite UI modules + +namespace Infragistics.Samples +{ + public class Program + { + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + // registering Ignite UI modules + builder.Services.AddIgniteUIBlazor( + typeof(IgbTileManagerModule), + typeof(IgbButtonModule) + ); + await builder.Build().RunAsync(); + } + } +} diff --git a/samples/layouts/tile-manager/layout/Properties/launchSettings.json b/samples/layouts/tile-manager/layout/Properties/launchSettings.json new file mode 100644 index 0000000000..468407d277 --- /dev/null +++ b/samples/layouts/tile-manager/layout/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:4200", + "sslPort": 44385 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BlazorClientApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:4200" + } + } +} diff --git a/samples/layouts/tile-manager/layout/README.md b/samples/layouts/tile-manager/layout/README.md new file mode 100644 index 0000000000..39e47e15bf --- /dev/null +++ b/samples/layouts/tile-manager/layout/README.md @@ -0,0 +1,70 @@ + + + +This folder contains implementation of Blazor application with example of Layout feature using [Tile Manager](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-getting-started.html) component. + + + + + + + View Docs + + + View Code + + + Run Sample + + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-blazor-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-blazor-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Setup + +- instal **.NET SDK** from this [website](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/install) + +## Running App in Visual Studio 2022 + +NOTE: VS 2022 has better code highlighting and error detection than VS Code does. + +- open **Visual Studio 2022** as an administrator + +- open the **BlazorClientApp.sln** solution + +- right click solution and select **Restore NuGet Packages** menu item + +- click **Debug** menu and select **Start Debugging** or press **F5** key + + +## Running App in VS Code + +- open **VS Code** as an administrator + +- open this folder in **VS Code** + +- open a terminal window + +- to restore assemblies, run this command: +```dotnet restore``` + +- to run samples, run this command: +```dotnet watch run``` + +- wait for for message: +**Now listening on: http://localhost:4200** + +- open **http://localhost:4200** in your browser + + +## Resources + +- [Razor Component Models](https://www.codemag.com/article/1911052) +- [Razor Syntax](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#razor-syntax) +- [Getting reference to components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#capture-references-to-components) diff --git a/samples/layouts/tile-manager/layout/_Imports.razor b/samples/layouts/tile-manager/layout/_Imports.razor new file mode 100644 index 0000000000..b4bad03986 --- /dev/null +++ b/samples/layouts/tile-manager/layout/_Imports.razor @@ -0,0 +1,8 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using Infragistics.Samples diff --git a/samples/layouts/tile-manager/layout/wwwroot/actions.js b/samples/layouts/tile-manager/layout/wwwroot/actions.js new file mode 100644 index 0000000000..9b9137de20 --- /dev/null +++ b/samples/layouts/tile-manager/layout/wwwroot/actions.js @@ -0,0 +1,26 @@ +let index = 4; + +window.addTile = () => { + const tileManager = document.querySelector('igc-tile-manager'); + const tiles = tileManager.querySelectorAll('igc-tile'); + const newTile = document.createElement('igc-tile'); + const contentHeader = document.createElement('span'); + const content = document.createElement('p'); + index++; + contentHeader.textContent = `Tile ${index} header`; + content.textContent = `Content for Tile ${index}`; + contentHeader.setAttribute('slot', 'title'); + newTile.position = 0; + newTile.append(contentHeader); + newTile.append(content); + tileManager.insertBefore(newTile, tiles[3]); +}; + +window.removeTile = () => { + const tileManager = document.querySelector('igc-tile-manager'); + const firstTile = tileManager.querySelector('igc-tile:first-of-type'); + + if (firstTile) { + firstTile.remove(); + } +} diff --git a/samples/layouts/tile-manager/layout/wwwroot/index.css b/samples/layouts/tile-manager/layout/wwwroot/index.css new file mode 100644 index 0000000000..8da172bb87 --- /dev/null +++ b/samples/layouts/tile-manager/layout/wwwroot/index.css @@ -0,0 +1,4 @@ +/* +CSS styles are loaded from the shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ \ No newline at end of file diff --git a/samples/layouts/tile-manager/layout/wwwroot/index.html b/samples/layouts/tile-manager/layout/wwwroot/index.html new file mode 100644 index 0000000000..79eafa30fc --- /dev/null +++ b/samples/layouts/tile-manager/layout/wwwroot/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + Samples | IgniteUI for Blazor | Infragistics + + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + + diff --git a/samples/layouts/tile-manager/layout/wwwroot/layout.css b/samples/layouts/tile-manager/layout/wwwroot/layout.css new file mode 100644 index 0000000000..13efd0a605 --- /dev/null +++ b/samples/layouts/tile-manager/layout/wwwroot/layout.css @@ -0,0 +1,20 @@ +span { + font-size: 30px; +} + +p { + font-size: 18px; + margin-left: 20px; +} + +.btnWrapper { + margin: 0 0 8px 22px; +} + +igc-button:nth-of-type(-n+3) { + margin-right: 5px; +} + +.sample { + overflow: auto; +} diff --git a/samples/layouts/tile-manager/overview/App.razor b/samples/layouts/tile-manager/overview/App.razor new file mode 100644 index 0000000000..9b26c6c1d0 --- /dev/null +++ b/samples/layouts/tile-manager/overview/App.razor @@ -0,0 +1,182 @@ +@using IgniteUI.Blazor.Controls + + + +
+ + +

Order info

+ + + + + +
+

OrderID

+

10293

+
+
+ + + + +
+

Customer Name

+

Tortuga Restaurante

+
+
+ + + + +
+

Order Date

+

August 29, 1996

+
+
+ + + + +
+

Shipped Date

+

September 11, 1996

+
+
+ + + + +
+

Product Name

+

Carnavon Tigers

+
+
+ + + + +
+

Ship Country

+

Mexico

+
+
+
+
+ +

Order Line Items

+
+ +
+ +
+ + + +
+

Carnavon Tigers

+
+ +
+ Quantity 12 +
+
+ Unit Price $50 +
+
+
+
+ +
+ +
+ + + +
+

Guarana Fantastica

+
+ +
+ Quantity 10 +
+
+ Unit Price $4 +
+
+
+
+ +
+ +
+ + + +
+

Vegie-spread

+
+ +
+ Quantity 5 +
+
+ Unit Price $35 +
+
+
+
+ +
+ +
+ + + +
+

Rhonbrau Klosterbier

+
+ +
+ Quantity 7 +
+
+ Unit Price $6 +
+
+
+
+
+
+ +

Order Value

+
+

$8.66K

+
+
+ +

Item quantity

+
+

4

+
+
+
+
+ +@code { + private IgbIcon IconRef { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (this.IconRef != null && firstRender) + { + await this.IconRef.EnsureReady(); + const string listIcon = ""; + const string calendarIcon = ""; + const string productIcon = ""; + await this.IconRef.RegisterIconFromTextAsync("list", listIcon, "material"); + await this.IconRef.RegisterIconFromTextAsync("calendar", calendarIcon, "material"); + await this.IconRef.RegisterIconFromTextAsync("product", productIcon, "material"); + } + } +} \ No newline at end of file diff --git a/samples/layouts/tile-manager/overview/BlazorClientApp.csproj b/samples/layouts/tile-manager/overview/BlazorClientApp.csproj new file mode 100644 index 0000000000..5af637830e --- /dev/null +++ b/samples/layouts/tile-manager/overview/BlazorClientApp.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + 3.0 + Infragistics.Samples + Infragistics.Samples + + + + 1701;1702,IDE0028,BL0005,0219,CS1998 + + + + + + + + + + + + + + diff --git a/samples/layouts/tile-manager/overview/BlazorClientApp.sln b/samples/layouts/tile-manager/overview/BlazorClientApp.sln new file mode 100644 index 0000000000..8e75057474 --- /dev/null +++ b/samples/layouts/tile-manager/overview/BlazorClientApp.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} + EndGlobalSection +EndGlobal diff --git a/samples/layouts/tile-manager/overview/Program.cs b/samples/layouts/tile-manager/overview/Program.cs new file mode 100644 index 0000000000..d14c92efea --- /dev/null +++ b/samples/layouts/tile-manager/overview/Program.cs @@ -0,0 +1,32 @@ +using System; +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using IgniteUI.Blazor.Controls; // for registering Ignite UI modules + +namespace Infragistics.Samples +{ + public class Program + { + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + // registering Ignite UI modules + builder.Services.AddIgniteUIBlazor( + typeof(IgbTileManagerModule), + typeof(IgbListModule), + typeof(IgbAvatarModule), + typeof(IgbIconModule), + typeof(IgbCardModule) + ); + await builder.Build().RunAsync(); + } + } +} diff --git a/samples/layouts/tile-manager/overview/Properties/launchSettings.json b/samples/layouts/tile-manager/overview/Properties/launchSettings.json new file mode 100644 index 0000000000..468407d277 --- /dev/null +++ b/samples/layouts/tile-manager/overview/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:4200", + "sslPort": 44385 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BlazorClientApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:4200" + } + } +} diff --git a/samples/layouts/tile-manager/overview/README.md b/samples/layouts/tile-manager/overview/README.md new file mode 100644 index 0000000000..b340663f8b --- /dev/null +++ b/samples/layouts/tile-manager/overview/README.md @@ -0,0 +1,70 @@ + + + +This folder contains implementation of Blazor application with example of Overview feature using [Tile Manager](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-getting-started.html) component. + + + + + + + View Docs + + + View Code + + + Run Sample + + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-blazor-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-blazor-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Setup + +- instal **.NET SDK** from this [website](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/install) + +## Running App in Visual Studio 2022 + +NOTE: VS 2022 has better code highlighting and error detection than VS Code does. + +- open **Visual Studio 2022** as an administrator + +- open the **BlazorClientApp.sln** solution + +- right click solution and select **Restore NuGet Packages** menu item + +- click **Debug** menu and select **Start Debugging** or press **F5** key + + +## Running App in VS Code + +- open **VS Code** as an administrator + +- open this folder in **VS Code** + +- open a terminal window + +- to restore assemblies, run this command: +```dotnet restore``` + +- to run samples, run this command: +```dotnet watch run``` + +- wait for for message: +**Now listening on: http://localhost:4200** + +- open **http://localhost:4200** in your browser + + +## Resources + +- [Razor Component Models](https://www.codemag.com/article/1911052) +- [Razor Syntax](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#razor-syntax) +- [Getting reference to components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#capture-references-to-components) diff --git a/samples/layouts/tile-manager/overview/_Imports.razor b/samples/layouts/tile-manager/overview/_Imports.razor new file mode 100644 index 0000000000..b4bad03986 --- /dev/null +++ b/samples/layouts/tile-manager/overview/_Imports.razor @@ -0,0 +1,8 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using Infragistics.Samples diff --git a/samples/layouts/tile-manager/overview/wwwroot/index.css b/samples/layouts/tile-manager/overview/wwwroot/index.css new file mode 100644 index 0000000000..8da172bb87 --- /dev/null +++ b/samples/layouts/tile-manager/overview/wwwroot/index.css @@ -0,0 +1,4 @@ +/* +CSS styles are loaded from the shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ \ No newline at end of file diff --git a/samples/layouts/tile-manager/overview/wwwroot/index.html b/samples/layouts/tile-manager/overview/wwwroot/index.html new file mode 100644 index 0000000000..79eafa30fc --- /dev/null +++ b/samples/layouts/tile-manager/overview/wwwroot/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + Samples | IgniteUI for Blazor | Infragistics + + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + + diff --git a/samples/layouts/tile-manager/overview/wwwroot/layout.css b/samples/layouts/tile-manager/overview/wwwroot/layout.css new file mode 100644 index 0000000000..4cc78815fc --- /dev/null +++ b/samples/layouts/tile-manager/overview/wwwroot/layout.css @@ -0,0 +1,38 @@ +igc-tile-manager { + margin-bottom: 5px; +} + +.group { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin-top: 15px; +} + +.card { + min-height: 30px; + width: calc(50% - 30px); + margin: 0 15px 15px 15px +} + +igc-card-content { + color: var(--content-text-color); +} + +.body-content { + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} + +.string { + text-align: center; + margin-top: 50px; + color: var(--ig-gray-800); +} + +.sample { + overflow: auto; +} diff --git a/samples/layouts/tile-manager/resize/App.razor b/samples/layouts/tile-manager/resize/App.razor new file mode 100644 index 0000000000..5d98e25bfb --- /dev/null +++ b/samples/layouts/tile-manager/resize/App.razor @@ -0,0 +1,73 @@ +@using IgniteUI.Blazor.Controls + + + +
+
+ + Always + Hover + None + + + +
+ + + Tile 1 header +

Content for Tile 1

+
+ + Tile 2 header +

Content for Tile 2

+
+ + Tile 3 header +

Content for Tile 3

+
+ + Tile 4 header +

Content for Tile 4

+
+
+
+ +@code { + private IgbTileManager TileManagerRef { get; set; } + private TileManagerResizeMode ResizeMode = TileManagerResizeMode.Always; + + public void OnRadioButtonClick(IgbRadioChangeEventArgs e) + { + if (this.TileManagerRef != null) + { + switch (e.Detail.Value) + { + case "Hover": + this.ResizeMode = TileManagerResizeMode.Hover; + break; + case "Always": + this.ResizeMode = TileManagerResizeMode.Always; + break; + case "None": + this.ResizeMode = TileManagerResizeMode.None; + break; + } + } + } + + public void OnInputChangeColumnWidth(IgbComponentValueChangedEventArgs e) + { + if (this.TileManagerRef != null) + { + this.TileManagerRef.MinColumnWidth = e.Detail; + } + } + + public void OnInputChangeRowHeight(IgbComponentValueChangedEventArgs e) + { + if (this.TileManagerRef != null) + { + this.TileManagerRef.MinRowHeight = e.Detail; + } + } +} \ No newline at end of file diff --git a/samples/layouts/tile-manager/resize/BlazorClientApp.csproj b/samples/layouts/tile-manager/resize/BlazorClientApp.csproj new file mode 100644 index 0000000000..5af637830e --- /dev/null +++ b/samples/layouts/tile-manager/resize/BlazorClientApp.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + 3.0 + Infragistics.Samples + Infragistics.Samples + + + + 1701;1702,IDE0028,BL0005,0219,CS1998 + + + + + + + + + + + + + + diff --git a/samples/layouts/tile-manager/resize/BlazorClientApp.sln b/samples/layouts/tile-manager/resize/BlazorClientApp.sln new file mode 100644 index 0000000000..8e75057474 --- /dev/null +++ b/samples/layouts/tile-manager/resize/BlazorClientApp.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} + EndGlobalSection +EndGlobal diff --git a/samples/layouts/tile-manager/resize/Program.cs b/samples/layouts/tile-manager/resize/Program.cs new file mode 100644 index 0000000000..7c795fb678 --- /dev/null +++ b/samples/layouts/tile-manager/resize/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using IgniteUI.Blazor.Controls; // for registering Ignite UI modules + +namespace Infragistics.Samples +{ + public class Program + { + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + // registering Ignite UI modules + builder.Services.AddIgniteUIBlazor( + typeof(IgbTileManagerModule), + typeof(IgbRadioGroupModule), + typeof(IgbRadioModule), + typeof(IgbInputModule) + ); + await builder.Build().RunAsync(); + } + } +} diff --git a/samples/layouts/tile-manager/resize/Properties/launchSettings.json b/samples/layouts/tile-manager/resize/Properties/launchSettings.json new file mode 100644 index 0000000000..468407d277 --- /dev/null +++ b/samples/layouts/tile-manager/resize/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:4200", + "sslPort": 44385 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BlazorClientApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:4200" + } + } +} diff --git a/samples/layouts/tile-manager/resize/README.md b/samples/layouts/tile-manager/resize/README.md new file mode 100644 index 0000000000..6bc1b44328 --- /dev/null +++ b/samples/layouts/tile-manager/resize/README.md @@ -0,0 +1,70 @@ + + + +This folder contains implementation of Blazor application with example of Resize feature using [Tile Manager](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-getting-started.html) component. + + + + + + + View Docs + + + View Code + + + Run Sample + + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-blazor-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-blazor-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Setup + +- instal **.NET SDK** from this [website](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/install) + +## Running App in Visual Studio 2022 + +NOTE: VS 2022 has better code highlighting and error detection than VS Code does. + +- open **Visual Studio 2022** as an administrator + +- open the **BlazorClientApp.sln** solution + +- right click solution and select **Restore NuGet Packages** menu item + +- click **Debug** menu and select **Start Debugging** or press **F5** key + + +## Running App in VS Code + +- open **VS Code** as an administrator + +- open this folder in **VS Code** + +- open a terminal window + +- to restore assemblies, run this command: +```dotnet restore``` + +- to run samples, run this command: +```dotnet watch run``` + +- wait for for message: +**Now listening on: http://localhost:4200** + +- open **http://localhost:4200** in your browser + + +## Resources + +- [Razor Component Models](https://www.codemag.com/article/1911052) +- [Razor Syntax](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#razor-syntax) +- [Getting reference to components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#capture-references-to-components) diff --git a/samples/layouts/tile-manager/resize/_Imports.razor b/samples/layouts/tile-manager/resize/_Imports.razor new file mode 100644 index 0000000000..b4bad03986 --- /dev/null +++ b/samples/layouts/tile-manager/resize/_Imports.razor @@ -0,0 +1,8 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using Infragistics.Samples diff --git a/samples/layouts/tile-manager/resize/wwwroot/index.css b/samples/layouts/tile-manager/resize/wwwroot/index.css new file mode 100644 index 0000000000..8da172bb87 --- /dev/null +++ b/samples/layouts/tile-manager/resize/wwwroot/index.css @@ -0,0 +1,4 @@ +/* +CSS styles are loaded from the shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ \ No newline at end of file diff --git a/samples/layouts/tile-manager/resize/wwwroot/index.html b/samples/layouts/tile-manager/resize/wwwroot/index.html new file mode 100644 index 0000000000..79eafa30fc --- /dev/null +++ b/samples/layouts/tile-manager/resize/wwwroot/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + Samples | IgniteUI for Blazor | Infragistics + + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + + diff --git a/samples/layouts/tile-manager/resize/wwwroot/layout.css b/samples/layouts/tile-manager/resize/wwwroot/layout.css new file mode 100644 index 0000000000..48680ec326 --- /dev/null +++ b/samples/layouts/tile-manager/resize/wwwroot/layout.css @@ -0,0 +1,32 @@ +span { + font-size: 30px; +} + +p { + font-size: 18px; + padding-left: 20px; +} + +igc-radio-group { + margin: 0 50px 0 22px; + width: fit-content; + padding: 4px 15px; + border: 2px solid var(--ig-primary-700); + background-color: var(--ig-gray-300); + align-self: end; +} + +.sample { + overflow: auto; +} + +.inputWrapper { + display: flex; + margin-bottom: 12px; +} + +igc-input { + width: min-content; + --ig-size: var(--ig-size-small); + margin-right: 50px; +} diff --git a/samples/layouts/tile-manager/styling/App.razor b/samples/layouts/tile-manager/styling/App.razor new file mode 100644 index 0000000000..30de1cdab6 --- /dev/null +++ b/samples/layouts/tile-manager/styling/App.razor @@ -0,0 +1,42 @@ +@using IgniteUI.Blazor.Controls + + + + +
+ + + + + + Tile 1 header +

Content for Tile 1

+
+ + Tile 2 header +

Content for Tile 2

+
+ + Tile 3 header +

Content for Tile 3

+
+ + Tile 4 header +

Content for Tile 4

+
+
+
+ +@code { + private IgbIcon IconRef { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (this.IconRef != null && firstRender) + { + await this.IconRef.EnsureReady(); + const string indicatorIcon = ""; + await this.IconRef.RegisterIconFromTextAsync("indicator", indicatorIcon, "material"); + } + } +} \ No newline at end of file diff --git a/samples/layouts/tile-manager/styling/BlazorClientApp.csproj b/samples/layouts/tile-manager/styling/BlazorClientApp.csproj new file mode 100644 index 0000000000..5af637830e --- /dev/null +++ b/samples/layouts/tile-manager/styling/BlazorClientApp.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + 3.0 + Infragistics.Samples + Infragistics.Samples + + + + 1701;1702,IDE0028,BL0005,0219,CS1998 + + + + + + + + + + + + + + diff --git a/samples/layouts/tile-manager/styling/BlazorClientApp.sln b/samples/layouts/tile-manager/styling/BlazorClientApp.sln new file mode 100644 index 0000000000..8e75057474 --- /dev/null +++ b/samples/layouts/tile-manager/styling/BlazorClientApp.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} + EndGlobalSection +EndGlobal diff --git a/samples/layouts/tile-manager/styling/Program.cs b/samples/layouts/tile-manager/styling/Program.cs new file mode 100644 index 0000000000..3011a07462 --- /dev/null +++ b/samples/layouts/tile-manager/styling/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using IgniteUI.Blazor.Controls; // for registering Ignite UI modules + +namespace Infragistics.Samples +{ + public class Program + { + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + // registering Ignite UI modules + builder.Services.AddIgniteUIBlazor( + typeof(IgbTileManagerModule), + typeof(IgbIconModule) + ); + await builder.Build().RunAsync(); + } + } +} diff --git a/samples/layouts/tile-manager/styling/Properties/launchSettings.json b/samples/layouts/tile-manager/styling/Properties/launchSettings.json new file mode 100644 index 0000000000..468407d277 --- /dev/null +++ b/samples/layouts/tile-manager/styling/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:4200", + "sslPort": 44385 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "BlazorClientApp": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:4200" + } + } +} diff --git a/samples/layouts/tile-manager/styling/README.md b/samples/layouts/tile-manager/styling/README.md new file mode 100644 index 0000000000..40d6c2caab --- /dev/null +++ b/samples/layouts/tile-manager/styling/README.md @@ -0,0 +1,70 @@ + + + +This folder contains implementation of Blazor application with example of Styling feature using [Tile Manager](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-getting-started.html) component. + + + + + + + View Docs + + + View Code + + + Run Sample + + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-blazor-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-blazor-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Setup + +- instal **.NET SDK** from this [website](https://dotnet.microsoft.com/learn/aspnet/blazor-tutorial/install) + +## Running App in Visual Studio 2022 + +NOTE: VS 2022 has better code highlighting and error detection than VS Code does. + +- open **Visual Studio 2022** as an administrator + +- open the **BlazorClientApp.sln** solution + +- right click solution and select **Restore NuGet Packages** menu item + +- click **Debug** menu and select **Start Debugging** or press **F5** key + + +## Running App in VS Code + +- open **VS Code** as an administrator + +- open this folder in **VS Code** + +- open a terminal window + +- to restore assemblies, run this command: +```dotnet restore``` + +- to run samples, run this command: +```dotnet watch run``` + +- wait for for message: +**Now listening on: http://localhost:4200** + +- open **http://localhost:4200** in your browser + + +## Resources + +- [Razor Component Models](https://www.codemag.com/article/1911052) +- [Razor Syntax](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#razor-syntax) +- [Getting reference to components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-3.1#capture-references-to-components) diff --git a/samples/layouts/tile-manager/styling/_Imports.razor b/samples/layouts/tile-manager/styling/_Imports.razor new file mode 100644 index 0000000000..b4bad03986 --- /dev/null +++ b/samples/layouts/tile-manager/styling/_Imports.razor @@ -0,0 +1,8 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using Infragistics.Samples diff --git a/samples/layouts/tile-manager/styling/wwwroot/index.css b/samples/layouts/tile-manager/styling/wwwroot/index.css new file mode 100644 index 0000000000..8da172bb87 --- /dev/null +++ b/samples/layouts/tile-manager/styling/wwwroot/index.css @@ -0,0 +1,4 @@ +/* +CSS styles are loaded from the shared CSS file located at: +https://static.infragistics.com/xplatform/css/samples/ +*/ \ No newline at end of file diff --git a/samples/layouts/tile-manager/styling/wwwroot/index.html b/samples/layouts/tile-manager/styling/wwwroot/index.html new file mode 100644 index 0000000000..79eafa30fc --- /dev/null +++ b/samples/layouts/tile-manager/styling/wwwroot/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + Samples | IgniteUI for Blazor | Infragistics + + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + + + diff --git a/samples/layouts/tile-manager/styling/wwwroot/layout.css b/samples/layouts/tile-manager/styling/wwwroot/layout.css new file mode 100644 index 0000000000..221f0a4b68 --- /dev/null +++ b/samples/layouts/tile-manager/styling/wwwroot/layout.css @@ -0,0 +1,12 @@ +span { + font-size: 30px; +} + +p { + font-size: 18px; + margin: 10px 0 0 20px; +} + +.sample { + overflow: auto; +} diff --git a/samples/layouts/tile-manager/styling/wwwroot/styles.css b/samples/layouts/tile-manager/styling/wwwroot/styles.css new file mode 100644 index 0000000000..0b014e4165 --- /dev/null +++ b/samples/layouts/tile-manager/styling/wwwroot/styles.css @@ -0,0 +1,41 @@ +igc-tile-manager::part(base) { + background-color: var(--ig-surface-900); +} + +igc-tile::part(content-container) { + color: var(--ig-secondary-200); +} + +igc-tile::part(header) { + background-color: var(--ig-gray-300); +} + +igc-tile::part(title) { + color: var(--ig-primary-400); +} + +igc-tile:nth-child(n+2)::part(trigger-side), igc-tile:nth-child(n+2)::part(trigger-bottom) { + background-color: var(--ig-success-500); +} + +igc-tile:nth-child(n+2)::part(trigger) { + background-color: var(--ig-error-500); +} + +.side, +.corner, +.bottom { + display: inline; + width: 100%; + height: 100%; +} + +.corner { + transform: rotate(220deg); + bottom: 8px; + right: 8px; +} + +.bottom { + transform: rotate(90deg); +}