ImKit 0.0.1
dotnet add package ImKit --version 0.0.1
NuGet\Install-Package ImKit -Version 0.0.1
<PackageReference Include="ImKit" Version="0.0.1" />
<PackageVersion Include="ImKit" Version="0.0.1" />
<PackageReference Include="ImKit" />
paket add ImKit --version 0.0.1
#r "nuget: ImKit, 0.0.1"
#:package ImKit@0.0.1
#addin nuget:?package=ImKit&version=0.0.1
#tool nuget:?package=ImKit&version=0.0.1
ImKit
Backend-agnostic building blocks for building Dear ImGui tools and editors in .NET, on top of ImGui.NET.
ImKit has no dependency on any graphics framework. For a ready-made MonoGame
renderer and DI wiring, add ImKit.MonoGame.
Install
dotnet add package ImKit
Targets net10.0.
Scope-based ImGui extensions
Dear ImGui's Begin/End pairs have to stay balanced, and an early return in the
middle of a window silently corrupts the stack. ImGuiExtensions adds extension members
on ImGui that take the body as a callback and always emit the matching End:
using ImKit; // brings the extension members on ImGui into scope
using ImGuiNET;
ImGui.Begin("Inspector", () =>
{
ImGui.SeparatorText("Transform", () =>
{
ImGui.Button("Reset", onClick: ResetTransform);
});
ImGui.BeginChild("Children", new Vector2(0, -30), ImGuiChildFlags.FrameStyle, () =>
{
foreach (var child in children)
ImGui.Selectable(child.Name, selected: child == _selected, () => _selected = child);
});
});
Covered: Begin, BeginChild, BeginPopupModal, BeginMenuBar, BeginMainMenuBar,
BeginMenu, MenuItem, Button, Selectable, SeparatorText.
Widget host
Implement IGuiWidget per panel and let GuiHost drive them:
public class InspectorWidget : IGuiWidget
{
public bool ShouldDraw => true;
public void Draw(FrameTime frameTime) => ImGui.Begin("Inspector", () => { /* ... */ });
}
IGui gui = new GuiHost(backend, widgets, dockSpace);
// once the graphics device exists
gui.Initialize();
// each frame
gui.Draw(new FrameTime(totalElapsed, sinceLastFrame));
FrameTime exists so widgets never take a dependency on a specific framework's time
type. dockSpace is optional — pass null for free-floating windows.
IGuiBackend is the seam a renderer implements (RebuildFontAtlas, BeforeLayout,
AfterLayout). Use ImKit.MonoGame or write your own.
Dock space
DockSpaceBase builds a full-viewport dock space split into left / middle / right /
bottom panels. Widgets dock themselves into a panel by id:
public class EditorDockSpace : DockSpaceBase
{
public bool ProjectLoaded { get; set; }
// Nothing docks until a project is open; the viewport background still fills.
protected override bool ShouldDraw => ProjectLoaded;
protected override float LeftPanelRatio => 0.25f;
}
// in a widget
if (dockSpace.LeftPanelId == 0)
return; // layout not built yet
ImGui.SetNextWindowDockID(dockSpace.LeftPanelId, ImGuiCond.Once);
ImGui.Begin("Files", () => _fileTree.Draw());
Override BuildLayout for a different arrangement, or ResetLayout() to rebuild it.
Dear ImGui's DockBuilder API is not exposed by ImGui.NET, so ImGuiDockBuilder provides
P/Invoke bindings against the cimgui native library ImGui.NET already ships. Docking
must be enabled on the ImGui context:
ImGui.GetIO().ConfigFlags |= ImGuiConfigFlags.DockingEnable;
File-system components
FileTree — expandable directory tree. FilePicker — modal file/folder picker.
PathSelection — the selectable rows both are built from. All callbacks receive the
entry's full path.
var tree = new FileTree(
title: "Assets",
workingDirectory: projectPath,
skippedExtensions: [".meta", ".tmp"],
onOpen: path => OpenAsset(path),
onRightClick: path => ShowContextMenu(path));
tree.Draw();
Links, device files, and dot-files are filtered out. Unreadable directories render as empty rather than throwing mid-window.
License
MIT
| 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
- ImGui.NET (>= 1.91.6.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ImKit:
| Package | Downloads |
|---|---|
|
ImKit.MonoGame
MonoGame backend for ImKit: a Dear ImGui renderer for MonoGame/FNA, texture binding, and dependency-injection wiring. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1 | 118 | 9/26/2026 |