Skip to main content

Posts

Local Storage Models in Blazor

Blazor is a new web framework by Microsoft which ships with .NET Core. In this post I explain how to use Local Storage in Blazor using the Blazored.LocalStorage package and how to improve on this by creating a custom service allowing you to use models (classes with properties) instead of string keys.

Blazored.LocalStorage First I explain how to use local storage in Blazor. I assume you already have a blazor project setup.

Install the Blazored.LocalStorage package with using NuGet. This can be done using the command in the Visual Studio package manager: Install-Package Blazored.LocalStorage
Then in the 'Startup.cs' file add the following line to 'ConfigureServices' to make the LocalStorage service available through dependency injection: services.AddBlazoredLocalStorage();
Now you are ready to use local storage on your pages. To import the namespace on all pages you can add the following line to '_Imports.razor': @using Blazored.LocalStorage
Now within…
Recent posts

Adding Context Menu Item for Windows Terminal To File Explorer

The new Windows terminal is a huge improvement over the traditional Command Prompt and Powershell. In this post I'll explain how to create a context menu shortcut 'Open Terminal Here' which appears when you right click in File Explorer. For this we will be editing the system registry so make sure you follow these steps exactly as accidently changing something in the registry can have serious consequences.

I will assume you have installed the latest preview version of Windows Terminal from the Windows Store.

What is Homomorphic Encryption?

Homomorphic Encryption is a promising cryptographic technique for keeping data private. In this post I give a short a simple summary of Homomorphic Encryption including a clear definition with an example use case in cloud computing.

Google Apps Script - Introduction With Some Tips and Tricks

Google Apps Script allows you to write and deploy code scripts through Google Drive. These scripts (written in JavaScript) run server-side and have full access to Google's APIs. This means you can use them to automate all sorts of things, from sending emails to editing spreadsheets.

I've added some examples I use regularly to this repository on GitHub.

Best Packages for Sublime Text 3 (Excluding Themes)

Sublime Text 3 is pretty good out-of-the-box but reaches a whole new level when you install some of the great packages on offer.

Below I'll list my favourite packages for Sublime Text. These are all packages which will enhance your productivity across all languages, so no themes or language-specific packages will be listed here.

Add Code to Google Blogger

This blog is built using Google Blogger. In my previous post I indcluded code snippets. Here I'll explain how I got those working.

Generating a MSI Installer for a WPF Application

This post serves as a tutorial for creating a MSI installer for your WPF Applications in Visual Studio. For this we use WiX (recommended by Microsoft).

Prerequisites I assume you already have a Visual Studio solution containing a WPF Project. And I assume you have some experience with Visual Studio and XML. You do not need any prior knowledge of WiX.
Step 1: Install Wix We are going to need WiX to generate our MSI.

If you don't already have Wix installed, go ahead and download it from here. You'll be redirected to the relevant GitHub releases page where you can download the .exe file to install WiX.