Jamesnet.Foundation is a XAML-based cross-platform library. One package covers every platform — install Jamesnet.Foundation and the right assembly for your platform is selected automatically at build time.
v10.0 — Single Package. The former
Jamesnet.Platform.*packages have been merged intoJamesnet.Foundation. See docs/ARCHITECTURE.ko.md for the design and the migration guide.
Note: NuGet publish date information is not available, so it is not included.
All of these are served by the single Jamesnet.Foundation package.
| Platform | Baseline |
|---|---|
| WPF | .NET 10 |
| OpenSilver | 3.3.3 |
| Uno Platform | Uno.Sdk 6.6.42 |
| WinUI 3 | Windows App SDK 2.4.0 |
| UWP | UniversalWindowsPlatform 6.2.15 |
One package, whichever platform you target:
Install-Package Jamesnet.FoundationThat's it — no platform-specific package to add.
Jamesnet.Foundation supports application initialization through the AppBootstrapper class. The following example demonstrates how to extend AppBootstrapper in a WPF project for initialization.
Note: There is no need to explain the
virtualkeyword or the oldSetMainWindowapproach.
using Jamesnet.Foundation; // this single using covers every platform
namespace MyApp
{
public class MyAppBootstrapper : AppBootstrapper
{
protected override void RegisterViewModels()
{
// Map the view to the view model.
ViewModelMapper.Register<MainContent, MainViewModel>();
}
protected override void RegisterDependencies(IContainer container)
{
// Register MainContent as the IView implementation with the key "MainContent".
Container.RegisterSingleton<IView, MainContent>("MainContent");
}
protected override void SettingsLayer(ILayerManager layer, IContainer container)
{
// Perform mapping using the "Main" key.
Mapping("Main", container.Resolve<IView>("MainContent"));
}
}
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
var bootstrapper = new MyAppBootstrapper();
bootstrapper.Run(); // Execute application initialization
}
}
}In this example:
- Dependency Registration:
Container.RegisterSingleton<IView, MainContent>("MainContent");registersMainContentas an implementation of theIViewinterface with the key"MainContent". - View-ViewModel Mapping:
ViewModelMapper.Register<MainContent, MainViewModel>();maps theMainContentview to theMainViewModel. - Layer Settings:
Mapping("Main", container.Resolve<IView>("MainContent"));sets up the mapping for the "Main" layer using the registered view.