As of November 2024 there are two main ways to use Blazor in EA.
Until recently (Oct 2024) this was the only option. It's simple: create an aura, add a C# Overlay and… that's it. EA takes care of drawing a window on the screen with your code inside. Otherwise it's a regular overlay: you can specify display conditions via triggers, adjust color, background, etc.
Here are a couple of overlay examples:
Let's make a tiny overlay with a button and counter.
IMPORTANT! The text editor used in this overlay will soon be replaced. Because of that I won't dig into its structure and instead recommend taking a look at option #2—scripts.
Now the main course. You can create not just one or two overlays controlled by triggers, but an entire window system driven by scripts. They appear wherever and whenever you want, look however you like. EA relieves you from much of the headache typical of WPF or WinForms, especially around multithreading.
Let's see how scripts can work with windows.
var window = GetService<IDialogWindowUnstableScriptingApi>() // get DialogWindow API
.CreateWindow<UserComponent>() //create new window with UserComponent inside
.AddTo(ExecutionAnchors); //destroy when script is stopped
window.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
window.ShowDialog();
This is the main interface intended for interacting with dialog windows. There are alternatives, but currently it's the highest-level and safest option—it takes care of unloading windows when an aura unloads, cleaning up resources, etc. It's called Unstable not because it's bad but because, being new, it may have breaking changes. Eventually it will become Stable.