Consolonia.Blazor 11.2.1-alpha-748

This is a prerelease version of Consolonia.Blazor.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Consolonia.Blazor --version 11.2.1-alpha-748
                    
NuGet\Install-Package Consolonia.Blazor -Version 11.2.1-alpha-748
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Consolonia.Blazor" Version="11.2.1-alpha-748" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Consolonia.Blazor" Version="11.2.1-alpha-748" />
                    
Directory.Packages.props
<PackageReference Include="Consolonia.Blazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Consolonia.Blazor --version 11.2.1-alpha-748
                    
#r "nuget: Consolonia.Blazor, 11.2.1-alpha-748"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Consolonia.Blazor@11.2.1-alpha-748
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Consolonia.Blazor&version=11.2.1-alpha-748&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Consolonia.Blazor&version=11.2.1-alpha-748&prerelease
                    
Install as a Cake Tool

Consolonia.Blazor

This package provides the ability to use Blazor .razor files to create Consolonia applications.

Background

Consolonia is a TUI (Text User Interface) (GUI Framework) implementation for Avalonia UI

Showcase (click picture to see video)

datagridpic

Example Razor file

Things to note:

  • Method binding to code behind
  • Conditional layout of elements
  • Full intellisense for renaming going to code behind autocomplete etc.
  • injection of INavigation so you can push and pop views off of the nav stack
  • injection of IClassicDesktopStyleApplicationLifetime so you can access Args and shutdown the app.
  • HOT RELOAD. simple save the file and your view gets rebuilt and rerendered!

blazor

@page "/"
@inject INavigation navigation
@inject IClassicDesktopStyleApplicationLifetime lifetime

@namespace Example.Blazor.Components

<Window Title="Blazor Bindings for Consolonia" Topmost="true">
     <StackPanel Orientation="Orientation.Vertical" VerticalAlignment="VerticalAlignment.Center">
        @if (showCounter)
        {
            <TextBlock HorizontalAlignment="HorizontalAlignment.Center">Counter: @CounterText</TextBlock>
        }
        <StackPanel Orientation="Orientation.Vertical" HorizontalAlignment="HorizontalAlignment.Center" Margin="@Thickness.Parse("4")">
            <Button OnClick="@OnIncrement">Increment counter support</Button>
            <Button OnClick="@OnToggleCounter">@ToggleText</Button>
            <Button OnClick="@OnMessageBox">Message Box</Button>
            <Button OnClick="@OnGotoSubPage">Go to SubPage</Button>
            <Button OnClick="@OnExit">Exit</Button>
        </StackPanel>
    </StackPanel> 
</Window>

@code {
    int counter = 0;
    bool showCounter = true;

    string CounterText => counter switch
    {
        0 => "Not clicked",
        1 => $"Clicked 1 time",
        _ => $"Clicked {counter} times"
    };

    string ToggleText => showCounter ? "Hide Counter" : "Show Counter";

    void OnIncrement()
        => counter++;

    void OnToggleCounter()
        => showCounter = !showCounter;

    void OnGotoSubPage()
        => navigation.PushAsync<SubPage>();

    async void OnMessageBox(RoutedEventArgs args)
    {
        await new MessageBox()
            .ShowDialogAsync((AC.Control)args.Source!, "Hello, Blazor!", "Blazor Bindings for Consolonia");
    }

    void OnExit()
       => lifetime.Shutdown();
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.3.7-beta.2027 347 11/18/2025
11.3.7-beta.1941 87 11/8/2025
11.3.7-beta.1831 86 10/25/2025
11.3.7-beta.1773 76 10/17/2025
11.3.4-beta.1699 70 10/10/2025
11.3.4-beta.1685 124 10/9/2025
11.3.4-beta.1648 131 10/1/2025
11.3.4-beta.1604 198 9/19/2025
11.3.4-beta.1598 213 9/19/2025
11.3.4-beta.1573 263 9/16/2025
11.3.4-beta.1547 111 9/13/2025
11.3.4-beta.1545 107 9/13/2025
11.3.4-beta.1533 106 9/13/2025
11.3.4-beta.1527 106 9/13/2025
11.3.4-beta.1499 70 9/12/2025
11.3.4-beta.1483 126 9/11/2025
11.3.4-beta.1464 123 9/9/2025
11.3.4-beta.1456 124 9/8/2025
11.3.4-beta.1452 128 9/8/2025
11.3.4-beta.1450 130 9/7/2025
11.3.4-beta.1442 104 9/6/2025
11.3.4-beta.1433 80 9/5/2025
11.3.4-beta.1425 146 9/4/2025
11.3.4-beta.1420 130 8/31/2025
11.3.4-beta.1416 133 8/31/2025
11.3.4-beta.1414 148 8/29/2025
11.3.4-beta.1408 176 8/28/2025
11.3.4-beta.1406 171 8/28/2025
11.3.4-beta.1396 171 8/28/2025
11.3.4-beta.1384 170 8/28/2025
11.3.4-beta.1374 171 8/28/2025
11.3.4-beta.1371 173 8/27/2025
11.3.4-beta.1369 173 8/27/2025
11.3.4-beta.1365 171 8/27/2025
11.3.4-beta.1359 178 8/27/2025
11.3.4-beta.1334 173 8/26/2025
11.3.4-beta.1325 196 8/26/2025
11.3.4-beta.1313 122 8/20/2025
11.2.5-beta.1305 121 8/19/2025
11.2.5-beta.1302 122 8/19/2025
11.2.5-beta.1298 125 8/18/2025
11.2.5-beta.1296 127 8/17/2025
11.2.5-beta.1294 129 8/17/2025
11.2.5-beta.1290 102 8/17/2025
11.2.5-beta.1287 99 8/17/2025
11.2.5-beta.1284 100 8/17/2025
11.2.5-beta.1278 53 8/16/2025
11.2.5-beta.1276 60 8/16/2025
11.2.5-beta.1273 59 8/16/2025
11.2.5-beta.1270 57 8/16/2025
11.2.5-beta.1264 56 8/16/2025
11.2.5-beta.1261 58 8/16/2025
11.2.5-beta.1259 54 8/16/2025
11.2.5-beta.1228 132 8/13/2025
11.2.5-beta.1221 79 8/10/2025
11.2.5-beta.1218 83 8/10/2025
11.2.5-beta.1213 84 8/10/2025
11.2.5-beta.1209 89 8/10/2025
11.2.5-beta.1207 84 8/10/2025
11.2.5-beta.1197 83 8/9/2025
11.2.5-beta.1176 126 8/3/2025
11.2.5-beta.1142 107 7/30/2025
11.2.5-beta.1102 69 7/4/2025
11.2.5-beta.1090 155 6/17/2025
11.2.5-beta.1077 137 6/3/2025
11.2.5-beta.1075 140 6/2/2025
11.2.5-beta.1065 145 4/8/2025
11.2.5-beta.1050 121 3/28/2025
11.2.5-beta.1047 118 3/27/2025
11.2.5-beta.1044 133 3/27/2025
11.2.5-beta.1026 153 3/23/2025
11.2.5-beta.1023 152 3/22/2025
11.2.5-beta.1018 151 3/22/2025
11.2.5-beta.1016 148 3/22/2025
11.2.5-beta.1008 71 3/22/2025
11.2.5-beta.1004 77 3/21/2025
11.2.5-beta.988 64 3/15/2025
11.2.5-beta.965 90 3/1/2025
11.2.5-beta.959 79 2/28/2025
11.2.3-beta.954 92 2/27/2025
11.2.3-beta.946 77 2/24/2025
11.2.3-beta.936 79 2/7/2025
11.2.3-beta.920 86 2/6/2025
11.2.3-beta.906 90 2/2/2025
11.2.3-beta.902 90 2/1/2025
11.2.3-beta.887 77 1/27/2025
11.2.3-beta.883 79 1/27/2025
11.2.3-beta.876 88 1/26/2025
11.2.3-beta.874 81 1/26/2025
11.2.3-beta.866 73 1/24/2025
11.2.3-beta.862 72 1/24/2025
11.2.3-beta.860 69 1/23/2025
11.2.3-beta.849 78 1/23/2025
11.2.3-beta.845 73 1/23/2025
11.2.3-beta.841 78 1/22/2025
11.2.3-beta.838 73 1/20/2025
11.2.3-beta.826 73 1/19/2025
11.2.3-beta.819 69 1/18/2025
11.2.3-beta.802 69 1/17/2025
11.2.3-beta.798 64 1/17/2025
11.2.3-beta.793 65 1/17/2025
11.2.3-beta.789 74 1/17/2025
11.2.3-beta.784 72 1/16/2025
11.2.1-alpha-782 70 1/16/2025
11.2.1-alpha-770 67 1/15/2025
11.2.1-alpha-764 52 1/15/2025
11.2.1-alpha-756 64 1/14/2025
11.2.1-alpha-748 87 1/10/2025
11.2.1-alpha-713 80 1/6/2025
11.2.1-alpha-711 103 1/4/2025
11.2.1-alpha-709 102 1/4/2025
11.2.1-alpha-701 108 1/4/2025
11.2.1-alpha-698 103 1/3/2025
11.2.1-alpha-678 106 1/1/2025
11.2.1-alpha-668 76 12/26/2024
11.2.1-alpha-664 71 12/26/2024
11.2.1-alpha-661 77 12/26/2024
11.2.1-alpha-652 84 12/25/2024
11.2.1-alpha-648 81 12/25/2024
11.2.1-alpha-646 82 12/25/2024
11.2.1-alpha-631 80 12/24/2024
11.2.1-alpha-626 87 12/23/2024
11.2.1-alpha-614 77 12/23/2024
11.2.1-alpha-606 86 12/21/2024
11.2.1-alpha-604 96 12/20/2024
11.2.1-alpha-598 95 12/19/2024
11.2.1-alpha-595 84 12/17/2024
11.2.1-alpha-593 87 12/17/2024
11.2.1-alpha-579 101 12/15/2024
11.2.1-alpha-577 91 12/15/2024
11.2.1-alpha-574 88 12/15/2024
11.2.1-alpha-568 97 12/15/2024
11.2.1-alpha-559 95 12/14/2024
11.2.1-alpha-547 92 12/13/2024
11.2.1-alpha-545 86 12/13/2024
11.2.1-alpha-540 90 12/13/2024
11.2.1-alpha-538 88 12/13/2024
11.2.1-alpha-523 89 12/8/2024
11.2.1-alpha-517 87 12/8/2024