Repository navigation
Added More Samples - #1133
Merged
Merged
Added More Samples#1133
Conversation
pr-comment: Run #175
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved macOS window-recreation defects leave windows hidden, controls detached, and clocks stopped, while incorrect Electron version reporting and missing accessible input labels also need correction.
6 open issues
Show replacement windows when they become ready · New Give the clipboard text input an accessible name · New Reattach WindowService when recreating the macOS window · New Read the Electron runtime version, not the app version · New Restart the clock when recreating the macOS window · New Add accessible names to both numeric inputs · New
What changed in this PR
Adds three sample projects to the Electron.NET solution, demonstrating cross-platform application icons, Blazor Server integration, and communication through preload scripts.
Changes:
- Adds runtime icon configuration, packaging settings, and platform-specific publishing profiles.
- Demonstrates Blazor components using Electron window controls, native services, and desktop events.
- Demonstrates an isolated preload API for request/reply messaging and .NET-to-page updates.
| File | Description |
|---|---|
src/ElectronNET.sln |
Registers all three sample projects. |
src/ElectronNET.Samples.PreloadScript/wwwroot/index.html |
Adds the messaging demonstration UI. |
src/ElectronNET.Samples.PreloadScript/wwwroot/app.js |
Connects page interactions to the preload API. |
src/ElectronNET.Samples.PreloadScript/wwwroot/app.css |
Styles the preload sample. |
src/ElectronNET.Samples.PreloadScript/README.md |
Explains preload configuration and messaging. |
src/ElectronNET.Samples.PreloadScript/Properties/launchSettings.json |
Configures development startup. |
src/ElectronNET.Samples.PreloadScript/Properties/electron-builder.json |
Defines Linux and Windows packaging. |
src/ElectronNET.Samples.PreloadScript/Program.cs |
Configures the window, message handlers, and clock. |
src/ElectronNET.Samples.PreloadScript/Preload/preload.js |
Exposes a restricted messaging API. |
src/ElectronNET.Samples.PreloadScript/ElectronNET.Samples.PreloadScript.csproj |
Configures dependencies and preload deployment. |
src/ElectronNET.Samples.BlazorServer/wwwroot/js/interop.js |
Provides viewport information through JavaScript interop. |
src/ElectronNET.Samples.BlazorServer/wwwroot/app.css |
Styles the Blazor sample. |
src/ElectronNET.Samples.BlazorServer/README.md |
Documents architecture and integration patterns. |
src/ElectronNET.Samples.BlazorServer/Properties/launchSettings.json |
Configures development startup. |
src/ElectronNET.Samples.BlazorServer/Properties/electron-builder.json |
Defines Linux and Windows packaging. |
src/ElectronNET.Samples.BlazorServer/Program.cs |
Wires Blazor, desktop services, and Electron startup. |
src/ElectronNET.Samples.BlazorServer/ElectronNET.Samples.BlazorServer.csproj |
Configures dependencies and single-instance behavior. |
src/ElectronNET.Samples.BlazorServer/Desktop/WindowService.cs |
Wraps window controls and tracks window state. |
src/ElectronNET.Samples.BlazorServer/Desktop/NativeService.cs |
Wraps dialogs, notifications, clipboard, and shell APIs. |
src/ElectronNET.Samples.BlazorServer/Desktop/ElectronStartup.cs |
Creates the main window and application menu. |
src/ElectronNET.Samples.BlazorServer/Desktop/AppEvents.cs |
Relays desktop events to components. |
src/ElectronNET.Samples.BlazorServer/Components/Routes.razor |
Defines routing and navigation focus. |
src/ElectronNET.Samples.BlazorServer/Components/Pages/WindowControl.razor |
Demonstrates window controls and live state. |
src/ElectronNET.Samples.BlazorServer/Components/Pages/NotFound.razor |
Adds a missing-page view. |
src/ElectronNET.Samples.BlazorServer/Components/Pages/Native.razor |
Demonstrates native desktop capabilities. |
src/ElectronNET.Samples.BlazorServer/Components/Pages/Interactivity.razor |
Demonstrates binding and JavaScript interop. |
src/ElectronNET.Samples.BlazorServer/Components/Pages/Home.razor |
Introduces the sample and its architecture. |
src/ElectronNET.Samples.BlazorServer/Components/Pages/Error.razor |
Adds a noninteractive error page. |
src/ElectronNET.Samples.BlazorServer/Components/Layout/MainLayout.razor |
Adds navigation and desktop-menu event handling. |
src/ElectronNET.Samples.BlazorServer/Components/App.razor |
Defines the document and render-mode selection. |
src/ElectronNET.Samples.BlazorServer/Components/_Imports.razor |
Shares component namespace imports. |
src/ElectronNET.Samples.BlazorServer/appsettings.json |
Sets logging and allowed-host defaults. |
src/ElectronNET.Samples.BlazorServer/appsettings.Development.json |
Configures development logging. |
src/ElectronNET.Samples.AppIcons/wwwroot/index.html |
Explains platform-specific icon usage. |
src/ElectronNET.Samples.AppIcons/README.md |
Documents icon formats, creation, and packaging. |
src/ElectronNET.Samples.AppIcons/Properties/PublishProfiles/win-x64.pubxml |
Adds self-contained Windows x64 publishing. |
src/ElectronNET.Samples.AppIcons/Properties/PublishProfiles/osx-x64.pubxml |
Adds self-contained macOS x64 publishing. |
src/ElectronNET.Samples.AppIcons/Properties/PublishProfiles/osx-arm64.pubxml |
Adds self-contained macOS ARM64 publishing. |
src/ElectronNET.Samples.AppIcons/Properties/PublishProfiles/linux-x64.pubxml |
Adds self-contained Linux x64 publishing. |
src/ElectronNET.Samples.AppIcons/Properties/launchSettings.json |
Configures development startup. |
src/ElectronNET.Samples.AppIcons/Properties/electron-builder.json |
Configures package targets and platform icons. |
src/ElectronNET.Samples.AppIcons/Program.cs |
Applies runtime window and Dock icons. |
src/ElectronNET.Samples.AppIcons/ElectronNET.Samples.AppIcons.csproj |
Configures dependencies and icon deployment. |
src/ElectronNET.Samples.AppIcons/Assets/app.svg |
Adds source artwork for the sample icon. |
Changelog.md |
Records support for WebContentsView. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request introduces new sample applications:
ElectronNET.Samples.AppIcons, demonstrating how to provide and configure application icons for Windows, Linux, and macOS in Electron.NET projects. It includes all necessary project files, runtime logic, packaging configurations, and documentation.ElectronNET.Samples.BlazorServer, shows how a Blazor server application can be properly wired and used.ElectronNET.Samples.PreloadScript, contains all parts to illustrate how preload scripts can be integrated and used to have custom communication between the web view and the bridge established.