ImApp 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ImApp --version 1.0.1
                    
NuGet\Install-Package ImApp -Version 1.0.1
                    
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="ImApp" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ImApp" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ImApp" />
                    
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 ImApp --version 1.0.1
                    
#r "nuget: ImApp, 1.0.1"
                    
#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 ImApp@1.0.1
                    
#: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=ImApp&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ImApp&version=1.0.1
                    
Install as a Cake Tool

ImApp

ImApp is a lightweight C# application framework for building native desktop applications with Dear ImGui, GLFW, and OpenGL.

It provides a simple application and window layer around the underlying rendering and platform backends, allowing you to focus on building your UI with Dear ImGui.

Status: Early development

Features

  • 🖥️ Native desktop windows through GLFW
  • 🎨 Dear ImGui integration
  • ⚡ OpenGL rendering
  • 🪟 Configurable window options
  • 🎯 Configurable target FPS
  • ⏱️ Frame DeltaTime
  • 🪟 Borderless windows
  • 🪟 Resizable windows
  • 🪟 Maximized windows
  • 🪟 Transparent windows
  • 📌 Topmost windows
  • 🖱️ Mouse passthrough
  • 🎮 Keyboard and gamepad navigation
  • 🧩 Dear ImGui docking support
  • 💻 .NET 10

Requirements

  • .NET 10 SDK
  • OpenGL 3.2+
  • GLFW-compatible desktop environment

Installation

Install ImApp from NuGet:

dotnet add package ImApp

Or add the package manually to your .csproj:

<ItemGroup>
    <PackageReference Include="ImApp" Version="0.1.0" />
</ItemGroup>

Quick Start

Create a basic ImApp application:

using Hexa.NET.ImGui;
using ImApp;

using var app = new App(new WindowOptions
{
    Title = "My ImApp",
    Width = 1000,
    Height = 700
});

app.Run(() =>
{
    ImGui.Begin("Hello");

    ImGui.Text("Hello from ImApp!");

    if (ImGui.Button("Click me"))
    {
        Console.WriteLine("Clicked!");
    }

    ImGui.End();
});

The App class handles:

  1. GLFW initialization
  2. OpenGL context creation
  3. Dear ImGui initialization
  4. Input/event processing
  5. Frame rendering
  6. Buffer swapping
  7. Resource cleanup

Window Options

WindowOptions controls the initial application window.

var options = new WindowOptions
{
    Title = "My Application",

    Width = 1000,
    Height = 700,

    Decorated = true,
    Resizable = true,

    Transparent = false,
    Topmost = false,

    Maximized = false,
    Visible = true,
    Focused = true,

    AutoIconify = true,
    FocusOnShow = true,

    MousePassthrough = false,

    DockingEnabled = false,

    TargetFps = 60
};

Window Properties

Property Description Default
Title Initial window title "ImApp Window"
Width Initial window width 800
Height Initial window height 600
Decorated Enables native window decorations true
Resizable Allows the window to be resized true
Transparent Enables a transparent framebuffer false
Topmost Keeps the window above other windows false
Maximized Starts the window maximized false
Visible Makes the window initially visible true
Focused Requests initial keyboard focus true
AutoIconify Iconifies fullscreen windows when focus is lost true
FocusOnShow Focuses the window when shown true
MousePassthrough Allows mouse input to pass through the window false
DockingEnabled Enables Dear ImGui docking false
TargetFps Target rendering rate 60

Frame Rate

ImApp provides a configurable frame-rate limiter.

using var app = new App(new WindowOptions
{
    TargetFps = 144
});

For example:

TargetFps = 60

targets approximately:

16.67 ms/frame

While:

TargetFps = 144

targets approximately:

6.94 ms/frame

Set TargetFps to 0 to disable the frame-rate limiter:

TargetFps = 0

Delta Time

App exposes the elapsed time between frames through DeltaTime.

app.Run(() =>
{
    double deltaTime = app.DeltaTime;

    ImGui.Text($"Delta Time: {deltaTime * 1000:F2} ms");
});

This is useful for:

  • Animations
  • Transitions
  • Timers
  • Scrolling
  • UI effects
  • Time-based updates

For example:

float speed = 100.0f;

position += speed * (float)app.DeltaTime;

FPS Display

You can calculate the current frame rate from DeltaTime:

app.Run(() =>
{
    if (app.DeltaTime > 0)
    {
        double fps = 1.0 / app.DeltaTime;

        ImGui.Text($"FPS: {fps:F0}");
    }
});

Transparent Windows

Enable a transparent framebuffer:

using var app = new App(new WindowOptions
{
    Title = "Transparent Window",

    Width = 800,
    Height = 600,

    Transparent = true,
    Decorated = false
});

ImApp clears the framebuffer with transparent alpha:

Gl.ClearColor(0, 0, 0, 0);

This allows the desktop compositor to display the area behind the window.

Transparent window behavior depends on the operating system, window system, compositor, graphics driver, and GLFW platform backend.


Borderless Windows

Disable native decorations:

using var app = new App(new WindowOptions
{
    Title = "Borderless Window",

    Width = 1000,
    Height = 600,

    Decorated = false
});

This is useful for applications that want to implement their own window decorations.


Topmost Windows

Set Topmost to true:

using var app = new App(new WindowOptions
{
    Title = "Overlay",

    Width = 500,
    Height = 300,

    Topmost = true,
    Decorated = false
});

The window will request that the window manager keep it above normal windows.


Mouse Passthrough

For overlays that should not receive mouse input:

using var app = new App(new WindowOptions
{
    Title = "Overlay",

    Transparent = true,
    Decorated = false,
    MousePassthrough = true
});

This allows mouse input to pass through the GLFW window to applications underneath it.


Docking

Dear ImGui docking can be enabled with:

using var app = new App(new WindowOptions
{
    Title = "Docking Application",

    Width = 1200,
    Height = 800,

    DockingEnabled = true
});

You can then use Dear ImGui's docking functionality normally.

For example:

app.Run(() =>
{
    ImGui.ShowDemoWindow();
});

The Dear ImGui demo window provides examples of the available UI and docking functionality.


Building UI

ImApp does not introduce a separate widget system.

Instead, it exposes the Dear ImGui API directly:

app.Run(() =>
{
    ImGui.Begin("Settings");

    ImGui.Text("Application Settings");

    bool enabled = true;

    ImGui.Checkbox(
        "Enabled",
        ref enabled
    );

    float value = 0.5f;

    ImGui.SliderFloat(
        "Value",
        ref value,
        0.0f,
        1.0f
    );

    if (ImGui.Button("Apply"))
    {
        Console.WriteLine("Applied");
    }

    ImGui.End();
});

This keeps ImApp small while giving applications access to Dear ImGui's complete UI API.


Application Loop

The application lifecycle is approximately:

App
 │
 ├── Initialize GLFW
 │
 ├── Create OpenGL window
 │
 ├── Create ImGui context
 │
 ├── Initialize GLFW backend
 │
 ├── Initialize OpenGL backend
 │
 └── Run
      │
      ├── Poll events
      │
      ├── Start ImGui frame
      │
      ├── Execute application UI
      │
      ├── Render ImGui
      │
      └── Swap buffers

The application provides its UI through:

app.Run(() =>
{
    // Application UI
});

The callback is executed once per rendered frame.


Complete Example

using Hexa.NET.ImGui;
using ImApp;

using var app = new App(new WindowOptions
{
    Title = "ImApp Example",

    Width = 900,
    Height = 600,

    Decorated = true,
    Resizable = true,

    DockingEnabled = true,

    TargetFps = 144
});

bool enabled = true;
float value = 0.5f;

app.Run(() =>
{
    ImGui.Begin("Application");

    ImGui.Text("Welcome to ImApp!");

    ImGui.Separator();

    ImGui.Checkbox(
        "Enabled",
        ref enabled
    );

    ImGui.SliderFloat(
        "Value",
        ref value,
        0.0f,
        1.0f
    );

    if (app.DeltaTime > 0)
    {
        ImGui.Text(
            $"FPS: {1.0 / app.DeltaTime:F0}"
        );

        ImGui.Text(
            $"Frame: {app.DeltaTime * 1000:F2} ms"
        );
    }

    if (ImGui.Button("Apply"))
    {
        Console.WriteLine("Applied");
    }

    ImGui.End();
});

Dependencies

ImApp is built on top of:

  • Dear ImGui
  • Hexa.NET.ImGui
  • Hexa.NET.GLFW
  • Hexa.NET.OpenGL
  • GLFW
  • OpenGL
  • .NET 10

ImApp provides the application, window, timing, and lifecycle layer while Dear ImGui remains the primary UI API.


Project Structure

A typical ImApp application can be very small:

MyApplication/
├── MyApplication.csproj
└── Program.cs

Example Program.cs:

using Hexa.NET.ImGui;
using ImApp;

using var app = new App();

app.Run(() =>
{
    ImGui.ShowDemoWindow();
});

Building from Source

Clone the repository:

git clone https://github.com/yourname/ImApp.git
cd ImApp

Build:

dotnet build

Create a Release build:

dotnet build -c Release

Create a NuGet package:

dotnet pack -c Release

The generated package will be placed in:

bin/Release/

Roadmap

  • GLFW application initialization
  • OpenGL rendering
  • Dear ImGui integration
  • Configurable window options
  • Transparent windows
  • Borderless windows
  • Topmost windows
  • Mouse passthrough
  • Docking
  • Target FPS
  • Frame timing
  • Runtime window management
  • Application events
  • Input abstraction
  • Custom window decorations
  • Improved platform support
  • Better lifecycle and error handling
  • Multi-viewport support

License

ImApp is licensed under the MIT License.

See LICENSE for details.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.0.2 93 10/4/2026
2.0.1 86 10/4/2026
2.0.0 101 10/1/2026
1.0.1 106 10/1/2026 1.0.1 is deprecated because it is no longer maintained.
1.0.0 130 9/18/2026 1.0.0 is deprecated because it is no longer maintained and has critical bugs.