Consolonia.ManagedWindows
11.3.9
dotnet add package Consolonia.ManagedWindows --version 11.3.9
NuGet\Install-Package Consolonia.ManagedWindows -Version 11.3.9
<PackageReference Include="Consolonia.ManagedWindows" Version="11.3.9" />
<PackageVersion Include="Consolonia.ManagedWindows" Version="11.3.9" />
<PackageReference Include="Consolonia.ManagedWindows" />
paket add Consolonia.ManagedWindows --version 11.3.9
#r "nuget: Consolonia.ManagedWindows, 11.3.9"
#:package Consolonia.ManagedWindows@11.3.9
#addin nuget:?package=Consolonia.ManagedWindows&version=11.3.9
#tool nuget:?package=Consolonia.ManagedWindows&version=11.3.9
Consolonia.ManagedWindows
Managed windows and storage integration for Consolonia/Avalonia apps running in the console.
This module provides:
- File and folder pickers implemented as managed windows (open, save, pick folder).
- An
IStorageProviderimplementation that plugs into Avalonia (ConsoloniaStorageProvider). - Simple wrappers for system files/folders (
SystemStorageFile,SystemStorageFolder). - Theme resources for managed windows (Modern and TurboVision) with auto‑inclusion via
AutoManagedWindowStyles.
Getting started
- Enable the Consolonia storage provider in your app startup:
using Avalonia;
using Consolonia.ManagedWindows.Storage;
public static class Program
{
public static void Main(string[] args)
{
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
public static AppBuilder BuildAvaloniaApp() =>
AppBuilder.Configure<App>()
.UsePlatformDetect()
.UseConsoloniaStorage(); // <= enables Consolonia storage dialogs
}
- Include Managed Windows styles (Modern/TurboVision). The easiest way is to auto‑include styles based on your Consolonia theme family:
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:Consolonia.Themes;assembly=Consolonia.ManagedWindows">
<Application.Styles>
<themes:AutoManagedWindowStyles/>
</Application.Styles>
</Application>
Alternatively, include styles explicitly:
<StyleInclude Source="avares://Consolonia.ManagedWindows/Themes/Base.axaml" />
<StyleInclude Source="avares://Consolonia.ManagedWindows/Themes/TurboVision/TurboVision.axaml" />
Using the pickers (Avalonia IStorageProvider)
All standard Avalonia storage APIs are supported through TopLevel.StorageProvider.
Open files:
var topLevel = TopLevel.GetTopLevel(this)!;
var files = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{
Title = "Open files",
AllowMultiple = true,
FileTypeFilter = new[]
{
new FilePickerFileType("Text") { Patterns = new[] { "*.txt", "*.md" } }
}
});
Save a file:
var topLevel = TopLevel.GetTopLevel(this)!;
var file = await topLevel.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
{
Title = "Save as",
SuggestedFileName = "document.txt"
});
if (file is not null)
{
await using var stream = await file.OpenWriteAsync();
// write your content
}
Pick a folder:
var topLevel = TopLevel.GetTopLevel(this)!;
var folders = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
{
Title = "Choose a folder",
AllowMultiple = false
});
You can also resolve paths directly through the provider:
var file = await topLevel.StorageProvider.TryGetFileFromPathAsync(new Uri("file:///path/to/file.txt"));
var folder = await topLevel.StorageProvider.TryGetFolderFromPathAsync(new Uri("file:///path/to/folder"));
What’s inside
Storage/StorageStartupExtensions.cs–AppBuilder.UseConsoloniaStorage()extension.Storage/ConsoloniaStorageProviderFactory.cs– wiresIStorageProviderfor aTopLevel.Storage/ConsoloniaStorageProvider.cs– implementsIStorageProviderusing managed dialogs.Controls/FileOpenPicker.*,FileSavePicker.*,FolderPicker.*– managed window dialogs.Controls/SystemStorageFile.cs,SystemStorageFolder.cs– system I/O wrappers.AutoManagedWindowStylesand resources inThemes/– styles for managed windows.
Samples
See src/Consolonia.Gallery for examples of using pickers in a running Consolonia app.
Dependencies
- Avalonia 11+
- Iciclecreek.Avalonia.WindowManager (for managed windows)
- Consolonia.Core / Consolonia.Themes
License
This project is part of the Consolonia repository and is licensed under the repository’s root license.
| Product | Versions 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. |
-
net8.0
- Avalonia (>= 11.3.12)
- CommunityToolkit.Mvvm (>= 8.4.0)
- Consolonia.Controls (>= 11.3.9)
- Consolonia.Core (>= 11.3.9)
- Consolonia.Themes (>= 11.3.9)
- DotNet.Glob (>= 3.1.3)
- Iciclecreek.Avalonia.WindowManager (>= 3.0.9)
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.9 | 100 | 3/22/2026 |
| 11.3.9-beta.2378 | 32 | 3/22/2026 |