Skip to content

Commit 523ab5f

Browse files
committed
984382: Updated the UG Document for Media Query
1 parent e1969cb commit 523ab5f

File tree

7 files changed

+55
-46
lines changed

7 files changed

+55
-46
lines changed

blazor/media-query/break-points.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ documentation: ug
99

1010
# Breakpoints in Blazor Media Query Component
1111

12-
The Blazor Media Query breakpoints are used to create responsive and adaptive layouts for your web applications by referring to specific points in a device's screen size where the layout and styling of the web application need to be adjusted for the best user experience. 
12+
The Blazor Media Query component utilizes breakpoints to create responsive and adaptive layouts. These breakpoints define specific screen sizes or characteristics where the layout and styling of a web application need to be adjusted to provide the best user experience.
1313

14-
## Built-in breakpoints
14+
## Built-in Breakpoints
1515

16-
You can customize the appearance of the applications based on screen size by using the built-in breakpoints. The [ActiveBreakpoint](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfMediaQuery.html#Syncfusion_Blazor_SfMediaQuery_ActiveBreakpoint) gives the breakpoint that is currently matching the media query.
16+
The component provides a set of built-in breakpoints for common screen sizes. The [`ActiveBreakpoint`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfMediaQuery.html#Syncfusion_Blazor_SfMediaQuery_ActiveBreakpoint) property returns the name of the breakpoint that currently matches the user's screen dimensions.
1717

1818
The built-in breakpoint values of Media Query component are as follows:
1919

2020
* Small - browser width <= 768 pixels
2121
* Medium - browser width between 768 and 1024 pixels
2222
* Large - browser width >= 1024 pixels
2323

24-
### Modifying built-in breakpoints
24+
### Modifying Built-in Breakpoints
2525

26-
You can modify the query for built-in breakpoints by using the [MediaQuery](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MediaBreakpoint.html#Syncfusion_Blazor_MediaBreakpoint_MediaQuery) property of the [MediaBreakpoint](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MediaBreakpoint.html) in `SfMediaQuery`.
26+
The media queries for these built-in breakpoints can be customized using the [`MediaQuery`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MediaBreakpoint.html#Syncfusion_Blazor_MediaBreakpoint_MediaQuery) property of the associated [MediaBreakpoint](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MediaBreakpoint.html) in `SfMediaQuery`.
2727

2828
```cshtml
2929
@@ -46,10 +46,11 @@ You can modify the query for built-in breakpoints by using the [MediaQuery](http
4646
}
4747
4848
```
49+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BXLIWZNsJsBGtlSP?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
50+
![Media Query Break Points](./images/breakpoints.png)
51+
## Custom Media Breakpoints
4952

50-
## Custom media breakpoints
51-
52-
The Blazor Media Query component allows you to define custom media breakpoints by using the [MediaBreakpoints](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfMediaQuery.html#Syncfusion_Blazor_SfMediaQuery_MediaBreakpoints) property to customize the appearance of the web application depending on your unique needs.
53+
The Blazor Media Query component allows defining entirely custom media breakpoints using the [`MediaBreakpoints`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfMediaQuery.html#Syncfusion_Blazor_SfMediaQuery_MediaBreakpoints) property. This provides fine-grained control over how the web application's appearance adapts to specific screen conditions.
5354

5455
```cshtml
5556
@@ -76,3 +77,5 @@ The Blazor Media Query component allows you to define custom media breakpoints b
7677
}
7778
7879
```
80+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VjrysjNiJCeMdxFn?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
81+
![Media Query Custom Break Points](./images/custom-breakpoint.png)

blazor/media-query/getting-started-webapp.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ control: Media Query
77
documentation: ug
88
---
99

10-
# Getting started with Blazor Media Query in Blazor Web App
10+
# Getting Started with Blazor Media Query Component in Blazor Web App
1111

12-
This section briefly explains about how to include `Blazor Media Query` component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and Visual Studio Code.
12+
This section explains how to integrate the Syncfusion `Blazor Media Query` component into a Blazor Web App using either [Visual Studio](https://visualstudio.microsoft.com/vs/) or Visual Studio Code.
1313

1414
{% tabcontents %}
1515

@@ -19,19 +19,19 @@ This section briefly explains about how to include `Blazor Media Query` componen
1919

2020
* [System requirements for Blazor components](https://blazor.syncfusion.com/documentation/system-requirements)
2121

22-
## Create a new Blazor Web App in Visual Studio
22+
## Create a New Blazor Web App in Visual Studio
2323

24-
You can 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 [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
24+
A **Blazor Web App** can be created using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
2525

26-
You need to configure the corresponding [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) while creating a Blazor Web Application.
26+
When creating the application, configure the corresponding [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) as required for the application.
2727

2828
## Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Core and Themes NuGet in the App
2929

3030
To add **Blazor Media Query** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Core](https://www.nuget.org/packages/Syncfusion.Blazor.Core) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
3131

32-
If you utilize `WebAssembly or Auto` render modes in the Blazor Web App need to be install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components NuGet packages within the client project.
32+
If `WebAssembly or Auto` render modes are utilized in the Blazor Web App need to be install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor component NuGet packages are installed within the client project.
3333

34-
Alternatively, you can utilize the following package manager command to achieve the same.
34+
Alternatively, the Package Manager Console can be used to install the required NuGet package
3535

3636
{% tabs %}
3737
{% highlight C# tabtitle="Package Manager" %}
@@ -42,7 +42,7 @@ Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
4242
{% endhighlight %}
4343
{% endtabs %}
4444

45-
N> Syncfusion<sup style="font-size:70%">&reg;</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.
45+
N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are available on [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 with component details.
4646

4747
{% endtabcontent %}
4848

@@ -52,11 +52,11 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
5252

5353
* [System requirements for Blazor components](https://blazor.syncfusion.com/documentation/system-requirements)
5454

55-
## Create a new Blazor Web App in Visual Studio Code
55+
## Create a New Blazor Web App in Visual Studio Code
5656

57-
You can 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 [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
57+
A **Blazor Web App** can be created 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 [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
5858

59-
You need to configure the corresponding [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) while creating a Blazor Web Application.
59+
Configure the corresponding [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 Application.
6060

6161
For example, in a Blazor Web App with the `Auto` interactive render mode, use the following commands.
6262

@@ -74,10 +74,10 @@ N> For more information on creating a **Blazor Web App** with various interactiv
7474

7575
## Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Core and Themes NuGet in the App
7676

77-
If you utilize `WebAssembly` or `Auto` render modes in the Blazor Web App need to be install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components NuGet packages within the client project.
77+
If `WebAssembly` or `Auto` render modes are utilized in the Blazor Web App, install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor component NuGet packages within the client project.
7878

7979
* Press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open the integrated terminal in Visual Studio Code.
80-
* Ensure you’re in the project root directory where your `.csproj` file is located.
80+
* Ensure the current directory is the project root containing the .csproj file.
8181
* Run the following command to install a [Syncfusion.Blazor.Core](https://www.nuget.org/packages/Syncfusion.Blazor.Core) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package and ensure all dependencies are installed.
8282

8383
{% tabs %}
@@ -115,9 +115,9 @@ Import the `Syncfusion.Blazor` namespace .
115115
{% endhighlight %}
116116
{% endtabs %}
117117

118-
Now, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of your Blazor Web App.
118+
Register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of the Blazor Web App.
119119

120-
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, you need to register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in both **~/Program.cs** files of your Blazor Web App.
120+
If the **Interactive Render Mode** is `WebAssembly` or `Auto`, Register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in both the server `~/Program.cs` and client `~/Program.cs` files.
121121

122122
{% tabs %}
123123
{% highlight c# tabtitle="Server(~/_Program.cs)" hl_lines="3 11" %}
@@ -151,7 +151,7 @@ await builder.Build().RunAsync();
151151
{% endhighlight %}
152152
{% endtabs %}
153153

154-
If the **Interactive Render Mode** is set to `Server`, your project will contain a single **~/Program.cs** file. So, you should register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service only in that **~/Program.cs** file.
154+
If the **Interactive Render Mode** is set to `Server`, Register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service only in the server-side **~/Program.cs** file.
155155

156156
{% tabs %}
157157
{% highlight c# tabtitle="~/_Program.cs" hl_lines="2 9" %}
@@ -172,7 +172,7 @@ var app = builder.Build();
172172
{% endhighlight %}
173173
{% endtabs %}
174174

175-
## Add stylesheet and script resources
175+
## Add Stylesheet and Script Resources
176176

177177
The theme stylesheet and script can be accessed from NuGet through [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Include the stylesheet reference in the `<head>` section and the script reference at the end of the `<body>` in the **~/Components/App.razor** file as shown below:
178178

@@ -188,7 +188,7 @@ The theme stylesheet and script can be accessed from NuGet through [Static Web A
188188
</body>
189189
```
190190

191-
N> Check out the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes) topic to discover various methods ([Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator)) for referencing themes in your Blazor application. Also, check out the [Adding Script Reference](https://blazor.syncfusion.com/documentation/common/adding-script-references) topic to learn different approaches for adding script references in your Blazor application.
191+
N> Check out the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes) topic to discover various methods ([Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator)) for referencing themes in a Blazor application. Also, check out the [Adding Script Reference](https://blazor.syncfusion.com/documentation/common/adding-script-references) topic to learn different approaches for adding script references in a Blazor application.
192192

193193
## Add Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Media Query component
194194

@@ -444,7 +444,7 @@ else
444444

445445
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/Blazor-Getting-Started-Examples/tree/main/MediaQuery/BlazorWebApp).
446446

447-
## See also
447+
## See Also
448448

449449
* [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor for Client-Side in .NET Core CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-dotnet-cli)
450450
* [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor for Server-side in Visual Studio](https://blazor.syncfusion.com/documentation/getting-started/blazor-server-side-visual-studio)

0 commit comments

Comments
 (0)