Iciclecreek.Avalonia.WindowManager 2.0.6

dotnet add package Iciclecreek.Avalonia.WindowManager --version 2.0.6
                    
NuGet\Install-Package Iciclecreek.Avalonia.WindowManager -Version 2.0.6
                    
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="Iciclecreek.Avalonia.WindowManager" Version="2.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Iciclecreek.Avalonia.WindowManager" Version="2.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Iciclecreek.Avalonia.WindowManager" />
                    
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 Iciclecreek.Avalonia.WindowManager --version 2.0.6
                    
#r "nuget: Iciclecreek.Avalonia.WindowManager, 2.0.6"
                    
#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.
#addin nuget:?package=Iciclecreek.Avalonia.WindowManager&version=2.0.6
                    
Install Iciclecreek.Avalonia.WindowManager as a Cake Addin
#tool nuget:?package=Iciclecreek.Avalonia.WindowManager&version=2.0.6
                    
Install Iciclecreek.Avalonia.WindowManager as a Cake Tool

Iciclecreek.Avalonia.WindowManager

This library implements a window manager for Avalonia with windows defined using Avalonia instead of native windows. This gives you the ability to create MDI style user interfaces in Avalonia, even in environments which don't support windowing like Android and iOS.

windows

Installation

To install you need to add a reference to the nuget package Iciclecreek.Avalonia.WindowManager

dotnet add package Iciclecreek.Avalonia.WindowManager

The window manager comes with a Light and Dark theme which you need to install into your app.xaml. To do that you need to:

  • Add Iciclecreek.Avalonia.WindowManager namespace xmlns:wm="using:Iciclecreek.Avalonia.WindowManager"
  • Add WindowManagerTheme

App.axaml

<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:wm="using:Iciclecreek.Avalonia.WindowManager"
             x:Class="Demo.App"
             RequestedThemeVariant="Default">
  <Application.Styles>
    <FluentTheme />
    <wm:WindowManagerTheme/>
  </Application.Styles>
</Application>

Usage

This library defines a single class:

  • ManagedWindow - a Window implementation which isn't native but instead 100% avalonia

ManagedWindow control

The ManagedWindow control is a clone of the Window control. It has standard Window properties like Title, WindowState, WindowStartupLocation, Position, etc. Instead of being hosted using Native windows, a ManagedWindow control is hosted via the Avalonia Overlay system.

Showing a window

To show a window you need to get an instance of the WindowsPanel and call ShowWindow().

For example: And code behind

   var window = new ManagedWindow()
   {
       Title = "My window",
       WindowStartupLocation=WindowStartupLocation.CenterScreen,
       Width=300, Height=300
   };
   window.Show()

To close a window you simple call Close().

Showing a Dialog

To show a dialog is exactly the same as Avalonia, you instantiate a ManagedWindow and call **.ShowDialog() **passing in the parent window.

   var dialogWindow = new ManagedWindow()
   {
       Title = "My window",
       WindowStartupLocation=WindowStartupLocation.CenterScreen,
       Width=300, Height=300
   };
    var result = await dialogWindow.ShowDialog<string>(this);

To close a dialog you call Close(result);

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Iciclecreek.Avalonia.WindowManager:

Package Downloads
Consolonia.Core

Text User Interface implementation of Avalonia UI (GUI Framework)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.6 533 3/24/2025
2.0.5 113 3/22/2025
2.0.4 43 3/22/2025
2.0.3 126 3/13/2025
2.0.2 223 3/9/2025
2.0.1 93 3/9/2025
2.0.0 84 3/8/2025
1.3.0 68 3/3/2025
1.2.0 79 3/2/2025
1.1.0 63 3/2/2025
1.0.2 54 3/2/2025
1.0.1 110 2/20/2025
1.0.0 99 2/20/2025