All user-controlled windows in EyeAuras are powered by its internal framework called BlazerWindows.
They are easy to create, thread-safe and fully support Blazor, bringing in best from two worlds(native/web dev) together.
Syntax highlighting in Razor files is still rough on edges, so for anything more serious than Hello, world
, I would recommend to use Component with code-behind. Then in .cs
you will have a proper highlighting.
And of course you can still export/import project and use Rider/Visual Studio with proper syntax highlighting even in Razor files.
You can import the ready-made example from here: https://eu.eyeauras.net/share/S20250227193905C9v8tD3LlBPa
Script.csx
var window = GetService<IBlazorWindow>();
window.ViewType = typeof(MainWindow);
window.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
window.ShowDialog();
MainWindow.razor
@namespace PhantomPixel
@inherits BlazorReactiveComponent
<h3 class="text-center">Interactive Counter</h3>
<div class="text-center mt-4">
<button @onclick="IncrementCount" class="btn btn-primary btn-lg">
Click Me
</button>
</div>
<p class="text-center mt-3" style="font-size: 1.5rem;">
You clicked <strong>@count</strong> times!
</p>
@code {
private int count = 0;
private void IncrementCount()
{
count++;
}
}