Skip to main content

Blazor

Blazor - Excluding Files from PWA Asset Cache

24 Mar 2021 - Cody Merritt Anhorn

In this quick article we will go over how to exclude a files from the Progressive Web Application asset cache.

Display a Docker Build Version

19 Mar 2021 - Cody Merritt Anhorn

In this Article I will show one way to show the Build or Application version, passing it down through a Docker build.

Creating a NuGet Package

17 Mar 2021 - Cody Merritt Anhorn

There are many ways to create a NuGet package, and in this article I will be using Github Actions to create the package, then publish it to NuGet.org.

Server based reCAPTCHA v3

10 Feb 2021 - Cody Merritt Anhorn

In this article I will show how to use reCAPTCHA v3, reCAPTCHA is used to protect your forms from bots, or not read the article to find out more.

Blazor - Library Interop Generator 1.0 Release

19 Nov 2020 - Cody Merritt Anhorn

I am finally comfortable enough to put the 1.0 Version on this project! The project it self is quite simple to grasp, you give it a TypeScript definition file and it will create a C# interop library for easier usage with ASP.NET Core Blazor.

Blazor Server - Get Access Token for User

06 Sep 2020 - Cody Merritt Anhorn

In this article I show, using Blazor Server, a few snippets to get the AccessToken for a logged in User. It is not as straight forward to get the AccessCode for a user, the snippets will be using an Authentication type of OpenID. I have included comments in the code below with helpful details that might be useful.

Blazor Wasm - Get Access Token for User

05 Sep 2020 - Cody Merritt Anhorn

In this article I show, using ASP.NET Core Blazor Wasm, a quick snippet to get the AccessToken for a logged in User. Not much to it just using the IAccessTokenProvider, and if the user is signed in and they have are using an authentication type that provides an access token, like OpenID.

Blazor - Enable API Endpoints

21 Aug 2020 - Cody Merritt Anhorn

Just a quick post showing how to enable API controllers in a Blazor server application. I noticed, for performance, the default templates I used does not automatically wire up API controllers that are in your application. To enable API controllers you just need to add to the endpoints mapping, endpoints.MapControllers();.

Project - EventHorizon Blazor TypeScript Interop Generator

28 Jul 2020 - Cody Merritt Anhorn

This project’s name is a mouthful, but based on the name you should be able to get the gist of what the project does. The project generates a C# Blazor Interop abstraction from the Abstract Syntax Tree from a TypeScript definition file, giving the user a generated project that can make interfacing with JavaScript libraries easier from C#.

Project - EventHorizon Blazor Interop

28 Jul 2020 - Cody Merritt Anhorn

I have been working on a project that will generate a C# Blazor WASM abstraction from a TypeScript definition file, as part of that project I needed a way to run the equivalent functionality in JavaScript. This article will go over that WASM Interop project I created, I also package it up in an easy to use NuGet package if you want to use it as well.

Blazor Interop Generation Tool Release

28 Jul 2020 - Cody Merritt Anhorn

This article is the Release post of my new Blazor Interop Generation Tool! Here I will do a quick overview of the tool and how to use it.

DotNet Core Github Action Flow

23 Jul 2020 - Cody Merritt Anhorn

To expand on my last article creating a quick GitHub action to build/test/deploy a .NET Core application. In this article I will go over the flow and action I created for my projects. You can jump right to the source project here: canhorn/EHZ_PlayGround

Quick .NET Core Blazor Build/Test/Code Coverage/Publish/Deploy Github Action

21 Jul 2020 - Cody Merritt Anhorn

This article is just a quick snippet of code showing off a github action that will build a .NET Core application, test the application with code coverage, publish that code coverage to Codecov, publish a ASP.NET Core Blazor WASM application, and deploy the published Blazor application as an Azure Static Web App.

Let Us Create - Blazor - OBS Remote

30 Jun 2020 - Cody Merritt Anhorn

Do you use OBS and want a fancy Blazor Server website to change scenes? (Or control most any part of your OBS setup…) Follow this Post to learn how!

Blazor - WebAssembly Interop

18 Jun 2020 - Cody Merritt Anhorn

Since I really love any reason to use Blazor I though I would look into using it in my new Game Client. This article is a quick one going over my findings.

Blazor - Custom Connection Details Display

03 Jun 2020 - Cody Merritt Anhorn

Blazor Server has a standard UX that display the reconnection status of the application, in this article I will show you one way to customize this UX.

Blazor - Custom Blazor Error Display

03 Jun 2020 - Cody Merritt Anhorn

Blazor has a few built in content areas, mainly for errors or the such, but with most things they should be customized. And this article will go over the little box at the bottom of the screen that shows when the server throws an exception.

Blazor Workshop - A Mobile Client Fork

28 May 2020 - Cody Merritt Anhorn

For the past week I took the time to fork the csharpfritz/blazor-workshop GitHub project and run through the sessions but creating them in the Experimental Mobile Blazor Bindings project. The project is quite simple so it was a good project to build a Mobile client in.

Blazor - State Management - Shared Inject

21 May 2020 - Cody Merritt Anhorn

In this article I will be going over State Management using an Inject Attribute in Blazor. I use this in my Blazor applications when I only want to access some sort of state from anywhere not in the context of a CascadingParameter. This is usually for components or code that is triggered by observers and could only be triggered in the context of a valid Zone.

Blazor - State Management - Cascading Parameter

21 May 2020 - Cody Merritt Anhorn

In this article I will be going over State Management using a Cascading Parameter in Blazor. I use this in my blazor applications when I only want to access some sort of state from my Components.

Blazor - The Big Three - Desktop/Mobile/Website

12 May 2020 - Cody Merritt Anhorn

I have been working with Blazor for a while now, since before Blazor Server went General Availability, and with that I have played around with a many different ways to create Applications. Blazor Server is currently the most stable of the technology today, so this article might be out of date in the future, so be warned. I will try and add new articles as the technology changes in the future.

Blazor - Multiple RenderFragments

30 Apr 2020 - Cody Merritt Anhorn

In Blazor using using a single RenderFragment will usually be used to dictate where the component’s children will be displayed. But Blazor also allows for the usage of multiple RenderFragments, when starting out how to dictate this can be a little obscure, this article should help with that.

Blazor - A Class/Code Only Based Component

26 Apr 2020 - Cody Merritt Anhorn

One powerful feature of Blazor is the ability to create Code-Only components. Using the BuildRenderTree method from the ComponentBase class you can, in code, create the output for the page.

Blazor - Mobile Blazor Bindings WebView Wrapper

21 Apr 2020 - Cody Merritt Anhorn

While getting into Mobile development using Xamarin, I found that I could use Blazor to create a Xamarin application. I find this more conformable, than working in the XAML of Xamarin, and I get to use my new favorite framework Blazor! But while creating the my application I found that the current supported bindings provided by the MobileBlazorBindings project did not have support for the WebView, so I had to create my own control wrapper around it, below is the example I created using the samples from the project.

Blazor Dynamic JavaScript Runner

14 Mar 2020 - Cody Merritt Anhorn

Even with Blazor you still need to use javascript in some form or fashion. And with this post we will go over how to create a simple JavaScript runner. The runner will just take a method identifier, the script as a string, and some arguments in the form of a simple object in C#.

Blazor Server as Desktop Application

15 Feb 2020 - Cody Merritt Anhorn

In this post we will go through my personal code used to create an Desktop Application. Using the WebWindow and an ASP.NET Core Blazor Server I can create a Desktop application that looks and behaves like a native application. Using this setup I am able to use my knowledge of website creation to expedite my creation of a desktop application, since I find it easier to think of my desktop applications in the manner.

Blazor - How to Create a Code-Behind Model

07 Jan 2020 - Cody Merritt Anhorn

To create a model for your Blazor Component just @inherits from the model. 😊 Not much else than that is needed, checkout the example below for exact details.