Prism.DryIoc.Avalonia
8.1.97.1
See the version list below for details.
dotnet add package Prism.DryIoc.Avalonia --version 8.1.97.1
NuGet\Install-Package Prism.DryIoc.Avalonia -Version 8.1.97.1
<PackageReference Include="Prism.DryIoc.Avalonia" Version="8.1.97.1" />
paket add Prism.DryIoc.Avalonia --version 8.1.97.1
#r "nuget: Prism.DryIoc.Avalonia, 8.1.97.1"
// Install Prism.DryIoc.Avalonia as a Cake Addin #addin nuget:?package=Prism.DryIoc.Avalonia&version=8.1.97.1 // Install Prism.DryIoc.Avalonia as a Cake Tool #tool nuget:?package=Prism.DryIoc.Avalonia&version=8.1.97.1
Prism.Avalonia
Prism.Avalonia provides your Avalonia apps with Prism framework support so you can navigate and perform dependency injection easier than before.
Package | NuGet |
---|---|
Prism.Avalonia | |
Prism.DryIoc.Avalonia |
Prism.Avalonia's logic and development approach is similar to that of Prism for WPF so you can get started right away with Prism for Avalonia!
Install
Add the DryIoc package to your project:
Install-Package Prism.DryIoc.Avalonia -Version 8.1.97.1
How to use
App.xaml.cs
public class App : PrismApplication
{
public static bool IsSingleViewLifetime =>
Environment.GetCommandLineArgs()
.Any(a => a == "--fbdev" || a == "--drm");
public static AppBuilder BuildAvaloniaApp() =>
AppBuilder
.Configure<App>()
.UsePlatformDetect();
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
base.Initialize(); // <-- Required
}
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
// Register Services
containerRegistry.Register<IRestService, RestService>();
// Views - Generic
containerRegistry.Register<MainWindow>();
// Views - Region Navigation
containerRegistry.RegisterForNavigation<DashboardView, DashboardViewModel>();
containerRegistry.RegisterForNavigation<SettingsView, SettingsViewModel>();
containerRegistry.RegisterForNavigation<SidebarView, SidebarViewModel>();
}
protected override IAvaloniaObject CreateShell()
{
if (IsSingleViewLifetime)
return Container.Resolve<MainControl>(); // For Linux Framebuffer or DRM
else
return Container.Resolve<MainWindow>();
}
protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
{
// Register modules
moduleCatalog.AddModule<Module1.Module>();
moduleCatalog.AddModule<Module2.Module>();
moduleCatalog.AddModule<Module3.Module>();
}
/// <summary>Called after <seealso cref="Initialize"/>.</summary>
protected override void OnInitialized()
{
// Register initial Views to Region.
var regionManager = Container.Resolve<IRegionManager>();
regionManager.RegisterViewWithRegion(RegionNames.ContentRegion, typeof(DashboardView));
regionManager.RegisterViewWithRegion(RegionNames.SidebarRegion, typeof(SidebarView));
}
}
Program.cs
public static class Program
{
public static AppBuilder BuildAvaloniaApp() =>
AppBuilder.Configure<App>()
.UsePlatformDetect()
.With(new X11PlatformOptions
{
EnableMultiTouch = true,
UseDBusMenu = true
})
.With(new Win32PlatformOptions
{
EnableMultitouch = true,
AllowEglInitialization = true
})
.UseSkia()
.UseReactiveUI()
.UseManagedSystemDialogs();
static int Main(string[] args)
{
double GetScaling()
{
var idx = Array.IndexOf(args, "--scaling");
if (idx != 0 && args.Length > idx + 1 &&
double.TryParse(args[idx + 1], NumberStyles.Any, CultureInfo.InvariantCulture, out var scaling))
return scaling;
return 1;
}
var builder = BuildAvaloniaApp();
InitializeLogging();
if (args.Contains("--fbdev"))
{
SilenceConsole();
return builder.StartLinuxFbDev(args, scaling: GetScaling());
}
else if (args.Contains("--drm"))
{
SilenceConsole();
return builder.StartLinuxDrm(args, scaling: GetScaling());
}
else
return builder.StartWithClassicDesktopLifetime(args);
}
static void SilenceConsole()
{
new Thread(() =>
{
Console.CursorVisible = false;
while (true)
Console.ReadKey(true);
})
{ IsBackground = true }.Start();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Avalonia (>= 0.10.18)
- Avalonia.Controls.DataGrid (>= 0.10.18)
- Avalonia.Desktop (>= 0.10.18)
- Avalonia.Diagnostics (>= 0.10.18)
- Avalonia.LinuxFramebuffer (>= 0.10.18)
- Avalonia.Markup.Xaml.Loader (>= 0.10.18)
- Avalonia.ReactiveUI (>= 0.10.18)
- DryIoc.dll (>= 4.8.0)
- Prism.Avalonia (>= 8.1.97.1)
- Prism.Core (>= 8.1.97)
-
net5.0
- Avalonia (>= 0.10.18)
- Avalonia.Controls.DataGrid (>= 0.10.18)
- Avalonia.Desktop (>= 0.10.18)
- Avalonia.Diagnostics (>= 0.10.18)
- Avalonia.LinuxFramebuffer (>= 0.10.18)
- Avalonia.Markup.Xaml.Loader (>= 0.10.18)
- Avalonia.ReactiveUI (>= 0.10.18)
- DryIoc.dll (>= 4.8.0)
- Prism.Avalonia (>= 8.1.97.1)
- Prism.Core (>= 8.1.97)
-
net6.0
- Avalonia (>= 0.10.18)
- Avalonia.Controls.DataGrid (>= 0.10.18)
- Avalonia.Desktop (>= 0.10.18)
- Avalonia.Diagnostics (>= 0.10.18)
- Avalonia.LinuxFramebuffer (>= 0.10.18)
- Avalonia.Markup.Xaml.Loader (>= 0.10.18)
- Avalonia.ReactiveUI (>= 0.10.18)
- DryIoc.dll (>= 4.8.0)
- Prism.Avalonia (>= 8.1.97.1)
- Prism.Core (>= 8.1.97)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Prism.DryIoc.Avalonia:
Package | Downloads |
---|---|
OneWare.Essentials
Essentials Needed for One Ware Plugin Development |
|
Abdrakov.Container.AvaloniaPrismAdapter
A lightweight container with adapter for Prism.Avalonia |
|
Shinya.Avalonia.Mvvm.Prism
Shinya.Framework |
|
Abdrakov.Solutions.Avalonia
A powerful base for Mvvm apps with Prism |
|
I18N.Avalonia.Prism
Avalonia Prism Internationalization module |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Prism.DryIoc.Avalonia:
Repository | Stars |
---|---|
yaobiao131/downkyicore
哔哩下载姬(跨平台版)downkyi,哔哩哔哩网站视频下载工具,支持批量下载,支持8K、HDR、杜比视界,提供工具箱(音视频提取、去水印等)。
|
|
irihitech/Ursa.Avalonia
Ursa is a UI library for building cross-platform UIs with Avalonia UI.
|
Version | Downloads | Last updated |
---|---|---|
9.0.401.11110-pre | 377 | 8/4/2024 |
9.0.401.11074-pre | 107 | 7/26/2024 |
9.0.401.11000-pre | 273 | 4/28/2024 |
9.0.271.11074-pre | 159 | 4/13/2024 |
8.1.97.11073 | 4,601 | 4/28/2024 |
8.1.97.11072 | 6,381 | 1/27/2024 |
8.1.97.11000 | 6,487 | 7/5/2023 |
8.1.97.11000-rc1.1 | 786 | 6/2/2023 |
8.1.97.1021 | 1,062 | 6/1/2023 |
8.1.97.11-preview.11.8 | 114 | 5/31/2023 |
8.1.97.4-preview.11.5 | 485 | 2/8/2023 |
8.1.97.3-preview.11.4 | 138 | 2/4/2023 |
8.1.97.2 | 1,385 | 12/9/2022 |
8.1.97.1 | 325 | 12/9/2022 |
8.1.97 | 1,604 | 7/18/2022 |
7.2.0.1430 | 3,788 | 1/28/2021 |
7.2.0.1429 | 596 | 9/26/2020 |
7.2.0.1428 | 858 | 4/14/2020 |
7.2.0.1427 | 616 | 2/11/2020 |
7.2.0.1426 | 612 | 1/31/2020 |
7.2.0.1425 | 532 | 1/30/2020 |
7.2.0.1424 | 620 | 12/30/2019 |
7.2.0.1423 | 587 | 12/18/2019 |
7.2.0.1422 | 807 | 11/26/2019 |
7.2.0.1367 | 1,091 | 9/3/2019 |
7.1.0.431 | 724 | 6/25/2019 |
* Fixed: Automatically performs `AutoWireViewModel`
* No longer need to device `prism:ViewModelLocator.AutoWireViewModel="True"` in View
* Updated DryIoc to v4.8.0
* Updated to Avalonia v0.10.18