Galosys.Foundation.AvalonDock
26.5.20.1
dotnet add package Galosys.Foundation.AvalonDock --version 26.5.20.1
NuGet\Install-Package Galosys.Foundation.AvalonDock -Version 26.5.20.1
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="Galosys.Foundation.AvalonDock" Version="26.5.20.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Galosys.Foundation.AvalonDock" Version="26.5.20.1" />
<PackageReference Include="Galosys.Foundation.AvalonDock" />
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 Galosys.Foundation.AvalonDock --version 26.5.20.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Galosys.Foundation.AvalonDock, 26.5.20.1"
#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 Galosys.Foundation.AvalonDock@26.5.20.1
#: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=Galosys.Foundation.AvalonDock&version=26.5.20.1
#tool nuget:?package=Galosys.Foundation.AvalonDock&version=26.5.20.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Galosys.Foundation.AvalonDock
AvalonDock Docking 导航模块,提供基于 AvalonDock 的多标签页导航服务,替代默认的 SimpleNavigationService。
成熟度: 🟡 预览 — 从 Wpf 基础模块拆分而来,功能已验证
安装
<PackageReference Include="Galosys.Foundation.AvalonDock" />
最小化配置
// App.xaml.cs
services.AddCore(ctx.Configuration)
.AddWpf() // 基础 WPF 服务(默认 SimpleNavigationService)
.AddAvalonDock() // 覆盖为 DockingNavigationService
.AddWpfControls()
.AddWpfPro();
AddAvalonDock()必须在AddWpf()之后调用,用AddSingleton覆盖TryAddSingleton的默认注册。
使用方式
// 获取 Docking 导航服务
var navigation = Ioc.Default.GetRequiredService<INavigationService>();
if (navigation is DockingNavigationService dockingNav)
{
dockingNav.DockingManager = dockingManager; // AvalonDock DockingManager 控件
dockingNav.DocumentPane = documentPane; // LayoutDocumentPane
}
// 导航到指定路由(自动创建标签页,重复路由激活已有标签)
await navigation.NavigateToAsync("OrderListPage");
await navigation.NavigateToAsync("UserDetailPage", userId); // 带参数
// 回退
if (navigation.CanGoBack)
await navigation.GoBackAsync();
功能一览
| 功能 | 说明 |
|---|---|
DockingNavigationService |
基于 AvalonDock 的多标签页导航(重复路由激活已有标签) |
AvalonPageNavigator |
遗留导航器(Singleton,兼容旧代码) |
AddAvalonDock() |
DI 扩展方法,注册 Docking 服务覆盖默认 |
NuGet 依赖
- Dirkster.AvalonDock
- Dirkster.AvalonDock.Themes.Aero / Expression / Metro / VS2010 / VS2013
从旧版迁移
在 v8.x 中,AvalonDock 相关代码包含在 Galosys.Foundation.Wpf 模块内。从本版本起拆分为独立模块:
- 添加 PackageReference:
<PackageReference Include="Galosys.Foundation.AvalonDock" />
- 在 DI 注册链中添加
AddAvalonDock():
services.AddCore(ctx.Configuration)
.AddWpf()
.AddAvalonDock() // 新增此行
.AddWpfControls()
.AddWpfPro();
- 命名空间无需修改(
DockingNavigationService仍在Galosys.Foundation.Wpf.Navigation,AvalonPageNavigator仍在Galosys.Foundation.Wpf)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows 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.
-
net8.0-windows7.0
- dirkster.avalondock (>= 4.72.1)
- dirkster.avalondock.themes.aero (>= 4.72.1)
- dirkster.avalondock.themes.expression (>= 4.72.1)
- dirkster.avalondock.themes.metro (>= 4.72.1)
- dirkster.avalondock.themes.vs2010 (>= 4.72.1)
- dirkster.avalondock.themes.vs2013 (>= 4.72.1)
- Galosys.Foundation.Core (>= 26.5.20.1)
- Galosys.Foundation.Wpf (>= 26.5.20.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.