You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/datagrid/how-to/create-custom-grid-component.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,11 @@ Create a reusable custom Grid component by wrapping the `SfGrid` in a Razor comp
13
13
14
14
The following example creates a `CustomGrid` wrapper that renders `SfGrid` with default properties such as `GridPageSettings`. Any unmatched attributes passed to `CustomGrid` are forwarded to the inner `SfGrid`, and content placed inside `CustomGrid` is projected as columns via `ChildContent`.
Copy file name to clipboardExpand all lines: blazor/speeddial/getting-started-webapp.md
+77-48Lines changed: 77 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ documentation: ug
9
9
10
10
# Getting Started with Blazor SpeedDial in Blazor Web App
11
11
12
-
This section explains how to add the Blazor Speed Dial component to a Blazor Web App using Visual Studio or Visual Studio Code.
12
+
This section briefly explains about how to include `Blazor SpeedDial`component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/), [Visual Studio Code](https://code.visualstudio.com/), and the [.NET CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/).
13
13
14
14
{% tabcontents %}
15
15
@@ -21,17 +21,19 @@ This section explains how to add the Blazor Speed Dial component to a Blazor Web
21
21
22
22
## Create a new Blazor Web App in Visual Studio
23
23
24
-
Create a Blazor Web App using Visual Studio 2022 via [Microsoft templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0) or the [SyncfusionBlazor extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
24
+
Create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vs) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
25
25
26
-
Configure the appropriate [interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=windows) when creating the Blazor Web App.
26
+
Configure the appropriate [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-10.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vs) while creating a Blazor Web App.
27
+
28
+

27
29
28
30
## Install Syncfusion<supstyle="font-size:70%">®</sup> Blazor Buttons and Themes NuGet in the App
29
31
30
-
To add the Blazor Speed Dial component to the app, open the NuGet Package Manager in Visual Studio (Tools → NuGet Package Manager → Manage NuGet Packages for Solution), then search for and install [Syncfusion.Blazor.Buttons](https://www.nuget.org/packages/Syncfusion.Blazor.Buttons) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
32
+
To add the **Blazor SpeedDial**component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), then search and install [Syncfusion.Blazor.Buttons](https://www.nuget.org/packages/Syncfusion.Blazor.Buttons) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
31
33
32
-
If you use the WebAssembly or Auto render modes in the Blazor Web App, you need to install the SyncfusionBlazor NuGet packages in the client project.
34
+
If using the `WebAssembly or Auto` render modes in the Blazor Web App, install Syncfusion<supstyle="font-size:70%">®</sup> Blazor component NuGet packages in the client project.
33
35
34
-
Alternatively, use the following Package Manager commands:
36
+
Alternatively, run the following commands in the Package Manager Console to achieve the same.
N> SyncfusionBlazor components are available on NuGet.org. For the full list of available packages, see [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages).
47
+
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to the [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
46
48
47
49
{% endtabcontent %}
48
50
@@ -54,11 +56,11 @@ N> Syncfusion Blazor components are available on NuGet.org. For the full list of
54
56
55
57
## Create a new Blazor Web App in Visual Studio Code
56
58
57
-
Create a Blazor Web App using Visual Studio Code via [Microsoft templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [SyncfusionBlazor extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
59
+
Create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vsc) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
58
60
59
-
Configure the appropriate [interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) when creating the Blazor Web App.
61
+
Configure the appropriate interactive render mode and interactivity location when setting up a Blazor Web App. For detailed information, refer to the [interactive render mode documentation](https://blazor.syncfusion.com/documentation/common/interactive-render-mode).
60
62
61
-
For example, in a Blazor Web App with the Auto interactive render mode, run the following commands:
63
+
For example, to create a Blazor Web App with the `Auto` interactive render mode, use the following commands.
62
64
63
65
{% tabs %}
64
66
{% highlight c# tabtitle="Blazor Web App" %}
@@ -70,11 +72,9 @@ cd BlazorWebApp.Client
70
72
{% endhighlight %}
71
73
{% endtabs %}
72
74
73
-
N> For more information on creating a Blazor Web App with various interactive modes and locations, see [Blazor Web App interactive modes and locations](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes).
74
-
75
75
## Install Syncfusion<supstyle="font-size:70%">®</sup> Blazor Buttons and Themes NuGet in the App
76
76
77
-
If utilize `WebAssembly` or `Auto` render modes in the Blazor Web App need to be install Syncfusion<supstyle="font-size:70%">®</sup> Blazor components NuGet packages within the client project.
77
+
If using the `WebAssembly` or `Auto` render modes in the Blazor Web App, install Syncfusion<supstyle="font-size:70%">®</sup> Blazor component NuGet packages in the client project.
78
78
79
79
* Press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open the integrated terminal in Visual Studio Code.
80
80
* Ensure you’re in the project root directory where your `.csproj` file is located.
@@ -92,20 +92,69 @@ dotnet restore
92
92
93
93
{% endtabs %}
94
94
95
-
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
95
+
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to the [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for the available NuGet packages list with component details.
96
96
97
97
{% endtabcontent %}
98
98
99
-
{% endtabcontents %}
99
+
{% tabcontent .NET CLI %}
100
100
101
-
## Register Syncfusion<supstyle="font-size:70%">®</sup> Blazor Service
101
+
## Prerequisites
102
+
103
+
Latest version of the [.NET SDK](https://dotnet.microsoft.com/en-us/download). If you previously installed the SDK, you can determine the installed version by executing the following command in a command prompt (Windows) or terminal (macOS) or command shell (Linux).
104
+
105
+
{% tabs %}
106
+
{% highlight c# tabtitle=".NET CLI" %}
107
+
108
+
dotnet --version
109
+
110
+
{% endhighlight %}
111
+
{% endtabs %}
112
+
113
+
## Create a Blazor Web App using .NET CLI
114
+
115
+
Run the following command to create a new Blazor Web App in a command prompt (Windows) or terminal (macOS) or command shell (Linux). For detailed instructions, refer to [this Blazor Web App Getting Started](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=.net-cli) documentation.
116
+
117
+
Configure the appropriate interactive render mode and interactivity location when setting up a Blazor Web Application. For detailed information, refer to the [interactive render mode documentation](https://blazor.syncfusion.com/documentation/common/interactive-render-mode).
102
118
103
-
| Interactive Render Mode | Description |
104
-
| -- | -- |
105
-
| WebAssembly or Auto | Open **~/_Imports.razor** from the client project. |
106
-
| Server | Open **~/_Imports.razor** (typically in the Components folder). |
119
+
For example, to create a Blazor Web App with the `Auto` interactive render mode, use the following commands:
107
120
108
-
Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Buttons` namespaces.
121
+
{% tabs %}
122
+
{% highlight c# tabtitle=".NET CLI" %}
123
+
124
+
dotnet new blazor -o BlazorApp -int Auto
125
+
cd BlazorApp
126
+
cd BlazorApp.Client
127
+
128
+
{% endhighlight %}
129
+
{% endtabs %}
130
+
131
+
This command creates a new Blazor Web App and places it in a new directory called `BlazorApp` inside your current location. See the [Create a Blazor App](https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/create) and [dotnet new CLI command](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?pivots=cli&view=aspnetcore-10.0) topics for more details.
132
+
133
+
## Install Syncfusion<supstyle="font-size:70%">®</sup> Blazor Buttons and Themes NuGet in the App
134
+
135
+
Here's an example of how to add **Blazor Speed Dial** component in the application using the following command in the command prompt (Windows) or terminal (Linux and macOS) to install a [Syncfusion.Blazor.Buttons](https://www.nuget.org/packages/Syncfusion.Blazor.Buttons/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package. See [Install and manage packages using the dotnet CLI](https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-dotnet-cli) topics for more details.
136
+
137
+
If using the `WebAssembly or Auto` render modes in the Blazor Web App, install Syncfusion<supstyle="font-size:70%">®</sup> Blazor component NuGet packages in the client project.
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to the [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for the available NuGet packages list with component details.
150
+
151
+
{% endtabcontent %}
152
+
153
+
{% endtabcontents %}
154
+
155
+
## Add Import Namespaces
156
+
157
+
Open the **~/_Imports.razor** file from the client project and import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Buttons` namespace.
109
158
110
159
{% tabs %}
111
160
{% highlight C# tabtitle="~/_Imports.razor" %}
@@ -116,9 +165,11 @@ Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Buttons` namespaces.
116
165
{% endhighlight %}
117
166
{% endtabs %}
118
167
119
-
Now register the Syncfusion Blazor service in the **~/Program.cs** file of the Blazor Web App.
168
+
## Register Syncfusion<supstyle="font-size:70%">®</sup> Blazor Service
169
+
170
+
Register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Service in the **~/Program.cs** file of your Blazor Web App.
120
171
121
-
If the interactive render mode is set to WebAssembly or Auto, register the SyncfusionBlazor service in both**~/Program.cs** files (server and client) of the Blazor Web App.
172
+
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor service in the**~/Program.cs** files of the main `server` project and associated `.Client` project.
If the **Interactive Render Mode** is set to `Server`, your project will contain a single **~/Program.cs** file. So, you should register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Service only in that **~/Program.cs** file.
The theme stylesheet and script are provided via NuGet as [static web assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Add the stylesheet reference in the head and the script reference at the end of the body in **~/Components/App.razor** as shown below. The script enables client-side interactivity for Syncfusion components.
@@ -194,16 +224,15 @@ N> Check out the [Blazor Themes](https://blazor.syncfusion.com/documentation/app
Add the Syncfusion<supstyle="font-size:70%">®</sup> Blazor SpeedDial component in the **~Pages/.razor** file. If an interactivity location as `Per page/component` in the web app, define a render mode at the top of the`~Pages/.razor` component, as follows:
227
+
Add the Syncfusion<supstyle="font-size:70%">®</sup> Blazor SpeedDial component to a Razor page located under the Pages folder (e.g., Pages/Home.razor) in either the **Server** or **Client** project. If an interactivity location as `Per page/component` in the web app, define a render mode at top of the component, as follows:
198
228
199
229
| Interactivity location | RenderMode | Code |
200
230
| --- | --- | --- |
201
231
| Per page/component | Auto |@rendermode InteractiveAuto |
N> If the interactivity location is set to Global and the render mode is Auto, WebAssembly, or Server, the render mode is configured in the App.razor file by default.
235
+
N> If an **Interactivity Location** is set to `Global` and the **Render Mode** is set to `Auto`or `WebAssembly`, the render mode is configured in the `App.razor` file by default.
207
236
208
237
{% tabs %}
209
238
{% highlight razor %}
@@ -230,7 +259,7 @@ N> If the interactivity location is set to Global and the render mode is Auto, W
230
259
{% endhighlight %}
231
260
{% endtabs %}
232
261
233
-
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<supstyle="font-size:70%">®</sup> Blazor SpeedDial component in your default web browser.
262
+
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<supstyle="font-size:70%">®</sup> Blazor SpeedDial component in the default web browser.
0 commit comments