This is an amazing piece of technology where your interactive web UI is handled via C# and streamed back and forth using web socket via SignalR.
The source code to Razor Component is here.
All the samples in this section runs on SSL. If you have not gotten your local self-sign SSL in order yet, please read this instruction.
-
This is the simplest Razor component app you can create. It will show you clearly the building block of a Razor component application.
There are two extra settings for dotnet watch to monitor
*.cshtml
and*.razor
file changes on two projects to make your development experience better.<Watch Include="**\*.cshtml" /> <Watch Include="**\*.razor" />
-
This sample demonstrates that you can use normal server side packages with your Razor Component as it is a truly server side system. This sample uses
Microsoft.SyndicationFeed.ReaderWriter
package to parse an external RSS feed and display it. -
This version of RSS Reader uses C# 8.0
IAsyncEnumerable
to process RSS data as they are available. There is an artificialawait Task.Delay(3000);
added toRssNews.GetNewsAsync
so you can see visually how the UI changes. -
This sample shows how to access JavaScript functions available at
windows
global scope. -
This sample shows you that the 'Transient' and 'Scoped' Dependency Injection method have different practical impact on Razor Component.
-
This sample shows how to use layout and nested layouts.
-
In this example we demonstrates how three different Razor Pages endpoints act as starting points for different path of your Server Side Blazor.
-
In this sample we will use System.Timers.Timer to perform multiple counters. It will also demonstrate the usage of BlazorStyled, a component that allows the usage of scoped CSS inside a Blazor component.
-
In this sample we will host a SignalR Hub in the same host as the Blazor Server Side
-
In this sample we will facilitate communication between components and pages using a Scoped lifetime AppState object.
-
This sample is similar to Component Events except that we will facilitate communication between components and pages using Blazor.EventAggregrator library.
-
This sample shows how to use localization and perform language switching in Blazor server using a global resource.
-
This sample shows how to use localization and perform language switching in Blazor server using Portable Object(PO) files.
-
Localization using PO with multiple files
This sample is similar to the previous one above except this time we allow translation files to be split into multiple files per language. This allows better organization of language translation.
-
This sample shows how to implement LTR/RTL support in Blazor.