Skip to content

v2.0.0

Choose a tag to compare

@StHung StHung released this 19 Jul 19:43

v2.0.0: Renamed to Barbatos.Wpf.Core, and a Whole New Essentials Layer

🚀 Barbatos.Wpf.Hosting is now Barbatos.Wpf.Core. Alongside the rename, this release adds a
full MAUI-style Essentials layer (AppInfo, Preferences, SecureStorage, Connectivity,
DeviceIdentity, and a dozen more) plus three new desktop features (SingleInstance,
IDialogService, SplashScreen) on top of the hosting model you already know.

⚠️ Breaking Changes

  • NuGet package ID renamed: Barbatos.Wpf.HostingBarbatos.Wpf.Core. This is an install
    change only — RootNamespace was already Barbatos.Wpf, so every existing using statement
    for the hosting APIs (WpfApp, WpfAppBuilder, WpfApplication, lifecycle events,
    dispatching, ...) keeps compiling unchanged. Update your project file / install command to the
    new package id (see below) and you're done.
  • GlobalHotkeys feature removed (IGlobalHotkeyService, ConfigureGlobalHotkeys,
    HotkeyGesture). If you were registering global hotkeys, that surface is gone in this release.

✨ What's New

  • A full Essentials layer, ported MAUI-style (I{Api} interface + {Api}.Current/.Default
    static facade), covering:
    • AppInfo / PublisherInfo — app and publisher metadata: name, version, AppGuid, theme,
      packaging model, plus InstallDate/InstallLocation read back from the Windows
      Programs-and-Features uninstall registry entry once your installer has run.
    • DeviceInfo / DeviceDisplay — device identity and live display metrics.
    • Connectivity — current network access and connection profiles, with change notifications.
    • FileSystem, Preferences, SecureStorage — app data/cache paths, key-value settings, and
      DPAPI-encrypted secret storage.
    • VersionTracking — first-launch-ever / first-launch-for-this-version/build detection.
    • AppActions — taskbar Jump List actions.
    • Launcher — open URIs and files through the shell, the Win32 desktop counterpart of MAUI's
      WinRT Launcher.
    • Email, Contacts — compose email via Simple MAPI, pick a contact.
    • Geolocation — device location.
    • DeviceIdentity — a reinstall-persistent InstanceId plus a salted hardware fingerprint,
      built for license enforcement without hardware IDs or third-party IP lookups.
  • SingleInstance — prevents duplicate launches of the same app, keyed by AppGuid.
    Enabled by default as soon as ConfigureSingleInstance() is called, unlike every other
    optional feature in this library — matches what nearly every modern desktop app already does.
  • IDialogService — centralizes showing and tracking child windows: reliable owner
    assignment (no more dialogs losing their owner or picking up an unrelated foreground app),
    graceful closeOthers/CloseAll() that still respects each dialog's own Closing veto, and
    duplicate-open prevention for Show() so a rapid double-click can't open the same dialog
    twice.
  • SplashScreen — a WpfApplication hook that shows a splash window before CreateWpfApp()
    runs, so it actually covers slow startup work. Use the built-in SplashWindow (app name/logo,
    tagline, clickable sponsor logos, clickable related-product links) via
    GetSplashScreenOptions(), or supply your own Window entirely via CreateSplashScreen().
    SplashScreenOptions.MinimumDisplayDuration (default 1.5s) keeps it visible long enough to
    avoid a flash on fast machines without ever delaying a slow one further.

🛠 Fixes

  • WpfHostEnvironment.EnvironmentName no longer returns a hardcoded value — it now reflects the
    actual configured hosting environment.

📦 Updating via NuGet

Barbatos.Wpf.Hosting is no longer published; install Barbatos.Wpf.Core instead:

dotnet remove package Barbatos.Wpf.Hosting
dotnet add package Barbatos.Wpf.Core --version 2.0.0