HackerOs.Windowing.Blazor
2.2.1
dotnet add package HackerOs.Windowing.Blazor --version 2.2.1
NuGet\Install-Package HackerOs.Windowing.Blazor -Version 2.2.1
<PackageReference Include="HackerOs.Windowing.Blazor" Version="2.2.1" />
<PackageVersion Include="HackerOs.Windowing.Blazor" Version="2.2.1" />
<PackageReference Include="HackerOs.Windowing.Blazor" />
paket add HackerOs.Windowing.Blazor --version 2.2.1
#r "nuget: HackerOs.Windowing.Blazor, 2.2.1"
#:package HackerOs.Windowing.Blazor@2.2.1
#addin nuget:?package=HackerOs.Windowing.Blazor&version=2.2.1
#tool nuget:?package=HackerOs.Windowing.Blazor&version=2.2.1
HackerOs.Windowing.Blazor
Razor components that render a HackerOs.Windowing.Core WindowRuntime:
DesktopArea (the workspace surface), WindowHost (one window's chrome
frame), and WindowChrome (title bar, minimize/maximize/close, and the
pointer-driven move/resize gesture). No MudBlazor dependency.
Usage
<DesktopArea Windows="Runtime.Windows"
OnFocus="HandleFocus"
OnMinimize="HandleMinimize"
OnToggleMaximize="HandleToggleMaximize"
OnClose="HandleClose"
OnGesture="HandleGesture">
<WindowContent Context="window">
@window.Content
</WindowContent>
</DesktopArea>
window.Content is the RenderFragment the host supplied when it created
that window's WindowRuntimeState — this package never needs to know what
a window's content actually is.
Pair this package with HackerOs.Taskbar.Blazor for a taskbar over the same
runtime. See HackerOs.Windowing.SampleHost in the source repository for a
complete, minimal host that uses only these packages.
Several screens
Give every DesktopArea the same WindowLayers and its own DisplayId. The area of
screen 1 renders each window once; a window on another screen has its element moved into
that screen's window layer (WindowPortal), so changing screen never recreates it. Add the
screen to the runtime (AddDisplayCommand) before rendering its area.
<DesktopArea Windows="Runtime.Windows" Layers="Layers" ... />
<DesktopArea Windows="Runtime.Windows" Layers="Layers" DisplayId="DisplayId.FromNumber(2)" ... />
See doc/en/wasm/dev/window-portal.md in the source repository (ADR 0178 §3).
With shared layers, a window dragged by its title bar and released over another screen's layer
(in the same page or in another browser window) moves to that screen, where it was dropped
(WindowChrome.ReportScreenDropAsync, ADR 0183, doc/en/wasm/dev/drag-between-screens.md).
Localization
The package's texts (accessible labels, window buttons such as Minimize, Maximize, Restore, Close, Back) live in Resources/Strings.resx
(English) and Resources/Strings.fr.resx (French), read through
HackerOs.Theming.Blazor.Localization.PackageStringLocalizer (ADR 0104): a host that
registers an IStringLocalizer<T> (HackerOS registers its session-language
SessionStringLocalizer<T>) gets its language; a host without localization gets English.
Single surface (phones)
SingleSurfaceArea shows one window at a time, full screen and without chrome,
as MobileShell does. It renders the stack given by
SingleSurfacePresentationPolicy.SelectSurfaceStack: the app's window, then
its owner-modal dialogs. Every window of the stack is maximized; only the top
one takes input, the windows under it stay mounted and inert. Each window host
is its own stacking context, so nothing in an app draws over its dialog
(ADR 0171).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- HackerOs.Theming.Blazor (>= 2.2.1)
- HackerOs.Windowing.Abstractions (>= 2.2.1)
- HackerOs.Windowing.Core (>= 2.2.1)
- Microsoft.AspNetCore.Components.Web (>= 10.0.13)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HackerOs.Windowing.Blazor:
| Package | Downloads |
|---|---|
|
HackerOs.Platform.Blazor
HackerOS Blazor shell: desktop, launcher, window launching, dialogs and lazy app loading. For composing an OS host. |
GitHub repositories
This package is not used by any popular GitHub repositories.
HackerOS 2.2.1, changes for app developers:
- Mouse Back and Forward buttons in apps. The mouse Back button, Alt+← and the phone's Back (Android button or gesture, iOS swipe) now go to the active app instead of moving the browser tab back and leaving HackerOS; the mouse Forward button and Alt+→ go forward. On a phone, Back follows the ◁ button. Apps receive them through IAppBackHandler and the new IAppForwardHandler, with the new MouseButton and SystemBack sources.
- App packages carry their satellite assemblies. HackerOsPack puts the satellite assemblies of the app's own assemblies in the package at lib/<culture>/<assembly>.resources.dll; the OS checks them and loads them before the app's first render.
- HackerOsPack packs every static resource of an app. The package now holds the whole wwwroot/, the collocated .razor.js files and the scoped CSS bundle, declared in the package's manifest with their SHA-256; the publish workflow of the hackeros-solution template copies that manifest into the catalog folder.
- Signing tool for app authors. dotnet build -t:HackerOsKeyGen creates an author's signing key, HackerOsPack signs each package with the HACKEROS_APP_SIGNING_KEY secret, and the hackeros-solution template publishes the signed packages on the hackeros-packages branch on each version tag. Administrators require an author's signature by adding their public key to [signing-keys].
Release notes: https://github.com/Kazo-ca/HackerOs/releases/tag/v2.2.1