An awaitable Blazor Modal Dialog
I already showcased a simple modal dialog in a previous post. However, the dialog was not awaitable. In this post, I'll show you how to create an awaitable modal dialog.
I already showcased a simple modal dialog in a previous post. However, the dialog was not awaitable. In this post, I'll show you how to create an awaitable modal dialog.
Next to the big release of .NET 8, we also released the first preview bUnit v2. This release is a major release, with a lot of new features and improvements. In this post, I will highlight some of the most important changes. This includes new features but also some breaking changes.
We made a recent addition to bUnit that we think will make your life easier. We call it bUnit Generators. It's a set of code generators that will help you create stubs for your third-party components.
There are many new cool features with .NET 8 and Blazor in particular. In this blog post, I want to highlight a feature that I believe is very useful in the new context Blazor is living.
In this blog post, we will use the Redux pattern with a small Blazor application. To demonstrate the inner workings, we will built everything from scratch.
Ever wondered how to use TailwindCSS with Blazor? Let's make it work!
New .NET and new Blazor features. In this blog post, I want to highlight the new features that are hitting us with .NET 8 in the Blazor world. So let's see what's new.
In this blog post we will create a ToolTip component in Blazor from scratch. We will use the Blazor WebAssembly template to create a new project. We will then add a ToolTip component to the project and use it in the Index page. We will also add some styling to the ToolTip component.
The advantage over using a library is that we can customize the component to our needs as well as keeping it simple! So let's get started!
Did you ever wonder what is a nice way of structuring your Blazor application?
I will show you how I structure my Blazor projects (as well as this very blog). What are the upside in contrast to the "default" structuring you get with the Blazor template.
If you are using Blazor WebAssembly aka client-side Blazor you are faced with an issue: The .NET runtime including your assemblies has to be downloaded first. We are taking about some megabytes as the initial load.
Depending on the connection of your client there is a time where basically nothing happens. The default template just has a simple "Loading..." text. So let's change that.
This blog post whill shed some light on when Blazor renders your content. Of course there are obvious candidates, but there are also some things to be aware about.
If you use a public Blazor Server application (like this blog is) and you want to expose an RSS Feed (I know kind of old school) you can perfectly do that with Blazor Server and a little help from a nuget package from Microsoft. Furthermore this guide is not only valid for Blazor but every ASP.NET Core endpoint.
What happens when a user navigates away and still has a pending request to our server? Or what happens if we have a request which might take forever and wastes our resources?
Let's tackle these problems with a CancellationToken
.
This short blog post will show you how to utilize Bootstrap to create a small and reuseable ModalDialogComponent
.
In our Blazor components we often call a repository or web API which takes some time. So it is nice to indicate to an user what the current state is. That is why we will create a small indicator even with steps to indicate how far we are in the progress.
Just imagine you have your beautiful model in a form. And Blazor is very kind and does validation for you. It is really straight forward because you can annotate your model with some attributes like RequiredAttribute
to tell Blazor: "Hey this property has to be set, otherwise the form will not be submitted."
But what if you want to have that easy setup with attributes but also want to say to Blazor: "Hey this property has to be set, if the other property is true.* Well, that does not work out of the box. So let's make it together!
Blazor is a beautiful framework for building SPA's. One advantage is that those SPA's feel like native applications. We do not feel that stuff is necessarily loading. But for that we have to keep our code performant.
This guide will highlight some of the techniques to keep your Blazor app running smoothly. We will also cover some more advanced use cases.
Blazor comes with the option to prerender your webpage on the server. This works for the client-side version as well as the server side version of Blazor.
Let's have a look how does it work and what might be some pitfalls and how can we come around those.
Since .NET5 we have the ability to "virtualize" a component.
But what exactly is that and how do we use it?
This blog post will show you a lot of details about the <Virtualize>
tag.
You probably are well aware of the Lifetime Scope for ASP.NET Core website.
There are basically 3 scopes: Transient
, Scoped
and Singleton
. Let's have a look how they differ in Blazor Client and Server.
This time we will have a look at end to end testing. For this we are using the Playwright C# library from Microsoft. This is the second part of the series. Go here for Part 1
This blog post should give you an easy and good introduction how to unit and end-to-end test your Blazor Application. Furthermore it does not matter if we are running server side or client side aka WebAssembly. The main two libraries we are using is first bUnit for unit-testing and Playwright for end-to-end testing. So let's dive in!
With .NET6 there is a lot to come what makes ASP.NET Core and especially Blazor better and more usable. In this article I will show some things which will definitely come (like AoT Compilation) and some things which might come (native Drag'n Drop support). Overall I feel .NET6 will be a big release which polishes the .NET Environment. Very looking forward.
In this article I will show you why I created my own blog-software from scratch and why I have a blog in the first place. Short answer: I like to know how to create a blog and I like blazor. Long answer you will find in the post.