NWindows 0.1.0

dotnet add package NWindows --version 0.1.0
                    
NuGet\Install-Package NWindows -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NWindows" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NWindows" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="NWindows" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NWindows --version 0.1.0
                    
#r "nuget: NWindows, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NWindows@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NWindows&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=NWindows&version=0.1.0
                    
Install as a Cake Tool

NWindows Build Status NuGet

<img align="right" width="160px" height="160px" src="https://raw.githubusercontent.com/xoofx/NWindows/main/img/NWindows.png">

NWindows is a cross-platform window creation and management library for .NET.

NWindows is aimed to provide all the infrastructure to manipulate a Window in a cross-platform manner and to interact with the input.

It is primarily meant to be used to create higher level applications (games, multimedia apps) or UI Frameworks.

NOTICE: The first version is only supporting the Windows 10+ platform. Help wanted for other platforms! 🤗

Features

  • Very lightweight with zero-dependencies .NET 7+ library.
  • GC friendly (Zero allocation for the events).
  • NativeAOT support (including the "reflection free mode")
    • You can create a small app under 1.5 MB.
  • Create top-level and popup windows.
    • Support for border-less windows.
    • Support for OS theme sync.
  • Input support: keyboard, mouse + cursor, text.
  • DPI aware and sync with OS changes.
  • Clipboard and Drag&Drop support.
  • FullScreen mode support.
  • Many modifiable properties with events
    • Size, position, visibility, maximize/minimum size, icon, resize-able, minimize-able, maximize-able, top-most, opacity, modal...
  • Screen properties.
  • Dispatcher threading infrastructure built-in to handle System and Window messages (similar to WPF Dispatcher)
  • Timer support

Getting started

using NWindows;
using NWindows.Threading;
using System.Drawing;

var mainWindow = Window.Create(new()
{
    Title = "Hello World",
    StartPosition = WindowStartPosition.CenterScreen,
    BackgroundColor = WindowSettings.Theme == WindowTheme.Light
        ? Color.FromArgb(245, 245, 245)
        : Color.FromArgb(30, 30, 30)
});

Dispatcher.Current.Run();

will create the following window on Windows:

alternate text is missing from this package README image

You will find more examples in the sample folder.

Install

NWindows is provided as a NuGet package.

User Guide

For more details on how to use NWindows, please visit the user guide.

License

This software is released under the BSD-2-Clause license.

Author

Alexandre Mutel aka xoofx.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 493 1/20/2023