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
<PackageReference Include="Iciclecreek.Avalonia.WindowManager" Version="2.0.6" />
<PackageVersion Include="Iciclecreek.Avalonia.WindowManager" Version="2.0.6" />
<PackageReference Include="Iciclecreek.Avalonia.WindowManager" />
paket add Iciclecreek.Avalonia.WindowManager --version 2.0.6
#r "nuget: Iciclecreek.Avalonia.WindowManager, 2.0.6"
#addin nuget:?package=Iciclecreek.Avalonia.WindowManager&version=2.0.6
#tool nuget:?package=Iciclecreek.Avalonia.WindowManager&version=2.0.6
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.
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 | 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. |
-
net8.0
- Avalonia (>= 11.2.5)
- Consolonia.Controls (>= 11.2.5-beta.1026)
- IconPacks.Avalonia.Codicons (>= 1.0.0)
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.