Skip to content

WPF-inspired UI framework for MonoGame/DesktopGL with XML markup, dependency properties, routed events, templates, binding, animation, and virtualization.

License

Notifications You must be signed in to change notification settings

Chevalier12/InkkSlinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InkkSlinger UI Framework

Is It Usable Yet? (tm sign here)

Evidence Pass (2026-03-02)

Check Result Evidence
Solution build Pass (Release, 0 errors, 0 warnings) dotnet build InkkSlinger.sln -c Release -v minimal
Test suite Partial (477/480, 3 failing) dotnet test InkkSlinger.Tests/InkkSlinger.Tests.csproj -c Release -v minimal
Current failing test areas 2 classes (InputDispatchOptimization, ViewportResizeInputRegression) Latest full release test run (2026-03-02)
WPF control coverage Broad but incomplete (70/77) TODO.md -> ## WPF Control Coverage
Open tracked work 7 unchecked TODO items TODO.md (missing controls)
Explicit unsupported behavior Present UI/Controls/Containers/UserControl.cs blocks custom ControlTemplate; UI/Input/Core/InputGestureService.cs blocks imperative gesture registration

Honest Verdict

Not yet production-ready as a general-purpose framework claim.

Conditionally usable for production only when your app stays inside the currently implemented/tested surface area and you accept the known gaps above (including the current 3 failing regression tests).

If the bar is "ship a targeted app on this stack," that can be reasonable.
If the bar is "framework-level broad production readiness," the current open parity/coverage gaps mean not yet.

.NET MonoGame WPF Parity

InkkSlinger is a custom UI framework for MonoGame/DesktopGL with one primary objective:

achieve practical WPF parity as closely as possible across APIs, behavior, composition model, and authoring workflow.

This repository is framework-first. The files in Views/ are validation/demo surfaces used to exercise framework features and regressions, not the end product.

Why This Exists

WPF provides a strong UI model, but it is not directly available inside game-oriented rendering pipelines like MonoGame/DesktopGL.

This project closes that gap by bringing WPF-style composition into a real-time loop:

  • build desktop-style UI in a MonoGame host
  • preserve familiar WPF-like authoring patterns
  • validate behavior through parity-focused tests

For Who This Is

Me.

This framework is unapologetically opinionated. It exists to satisfy a very specific bar for architecture, behavior, and authoring feel.

Vision

Bring a WPF-like development model into a game/render-loop environment by implementing:

  • dependency properties and metadata-driven behavior
  • routed events and focus/input semantics
  • measure/arrange style layout composition
  • resources, styles, triggers, and templating
  • MVVM-style binding primitives
  • timeline/storyboard-driven animation
  • broad control coverage with regression tests

WPF Parity Position

Parity is treated as a long-running engineering target, not a marketing claim. The implementation is broad and deep, but intentionally explicit about gaps.

Parity Summary

This matrix is compiled from TODO.md completed work, concrete type coverage under UI/, and the current regression suite.

Area Implemented Parity Surface Evidence Status
Dependency property system Core DP registration, metadata callbacks/options, value source layering UI/Core/DependencyProperties/DependencyObject.cs, UI/Core/DependencyProperties/DependencyProperty.cs, UI/Core/DependencyProperties/FrameworkPropertyMetadata.cs Implemented
Routed event model Routed event registration/dispatch + routed args types UI/Events/Core/EventManager.cs, UI/Events/Core/RoutedEvent.cs, UI/Events/Args/* Implemented
Input + focus pipeline Input snapshots/delta, dispatch state, focus management integrated into root update UI/Input/Core/InputManager.cs, UI/Input/Core/FocusManager.cs, UI/Managers/Root/Services/UiRootInputPipeline.cs Implemented
UI dispatcher/phase model Deferred operations + strict frame phase ordering UI/Core/Threading/Dispatcher.cs, UI/Managers/Root/Services/UiRootFrameState.cs, InkkSlinger.Tests/DispatcherPhaseOrderTests.cs Implemented (tested)
Layout framework Measure/arrange across framework elements and panels UI/Controls/Base/FrameworkElement.cs, UI/Managers/Layout/LayoutManager.cs, UI/Controls/Panels/* Implemented
Visual tree utilities Tree traversal + hit-test support for input/render decisions UI/Managers/Tree/VisualTreeHelper.cs Implemented
Resource dictionaries Local/tree/app resource resolution with dictionary change notifications UI/Resources/Core/ResourceDictionary.cs, UI/Resources/Core/ResourceResolver.cs, UI/Resources/Types/ResourceDictionaryChangedEventArgs.cs Implemented
Application resource bootstrapping App.xml load path into UiApplication with implicit theme/style availability at host startup Game1.cs (LoadApplicationResourcesFromFile), App.xml, InkkSlinger.Tests/AppXmlResourcesTests.cs Implemented (tested)
Style system Style, Setter, implicit/explicit style application, BasedOn support UI/Styling/Core/Style.cs, UI/Styling/Core/Setter.cs, TODO.md (Completed Milestones) Implemented
Trigger framework Property/data/multi-data/event triggers + condition evaluation UI/Styling/Triggers/Trigger.cs, UI/Styling/Triggers/DataTrigger.cs, UI/Styling/Triggers/MultiDataTrigger.cs, UI/Styling/Triggers/EventTrigger.cs Implemented
Trigger action runtime SetValueAction + storyboard action family in trigger execution path UI/Styling/Actions/SetValueAction.cs, UI/Styling/Actions/StoryboardActions.cs, UI/Xaml/Core/XamlLoader.cs (BuildTriggerAction) Implemented
Control templating ControlTemplate, template binding, template trigger engine UI/Templating/Core/ControlTemplate.cs, UI/Templating/Core/TemplateBinding.cs, UI/Templating/Core/TemplateTriggerEngine.cs Implemented
Data templating DataTemplate, selector, resolver pipeline UI/Templating/Data/DataTemplate.cs, UI/Templating/Data/DataTemplateSelector.cs, UI/Templating/Data/DataTemplateResolver.cs Implemented
Binding core Path, Source, ElementName, RelativeSource, modes and update triggers UI/Binding/Core/Binding.cs, UI/Binding/Core/BindingExpression.cs, UI/Binding/Core/BindingOperations.cs, UI/Binding/Types/BindingEnums.cs Implemented
Binding lifecycle robustness Rebind behavior on source/data-context/tree changes TODO.md (Completed Milestones: binding lifecycle robustness) Implemented
Routed commanding core RoutedCommand, command bindings, editing command catalog, can-execute/execute pipeline UI/Commanding/RoutedCommand.cs, UI/Commanding/CommandManager.cs, UI/Commanding/CommandBinding.cs, UI/Commanding/EditingCommands.cs, InkkSlinger.Tests/CommandingTests.cs Implemented (tested)
Gesture-to-command bridge Declarative InputBindings/KeyBinding keyboard chord routing into commands, including menu-mode key routing integration UI/Input/Core/InputGestureService.cs, UI/Input/Types/KeyBinding.cs, UI/Controls/Base/UIElement.cs, UI/Managers/Root/Services/UiRootInputPipeline.cs, InkkSlinger.Tests/MenuParityInputTests.cs Implemented
XAML/XML loader Runtime object graph construction, attached properties, handlers, bindings, templates, triggers UI/Xaml/Core/XamlLoader.cs Implemented
XAML diagnostics Element/attribute error reporting with contextual diagnostics UI/Xaml/Core/XamlLoader.cs, TODO.md (Completed Milestones: better diagnostics) Implemented
XML schema/tooling Authoring schemas for framework + x: namespace support Schemas/InkkSlinger.UI.xsd, Schemas/Xaml2006.xsd, TODO.md (Completed Milestones) Implemented
Name scope + source gen x:Name mapping via runtime scope + incremental generator UI/Core/Naming/NameScope.cs, InkkSlinger.XamlNameGenerator/XNameGenerator.cs, InkkSlinger.Tests/XNameSourceGeneratorTests.cs Implemented (tested)
Animation timeline system Timelines/storyboards, begin/stop/pause/resume/seek, handoff modes UI/Animation/Timelines/*, UI/Animation/Core/AnimationManager.cs, UI/Animation/Types/AnimationPrimitives.cs Implemented
Keyframe/easing support Double/color/point/thickness/int/object keyframes + easing/key-spline support UI/Animation/KeyFrames/*, UI/Animation/Easing/Easing.cs, UI/Animation/Types/* Implemented
Geometry and shapes Shape primitives + geometry/transform model + path markup parsing UI/Controls/Primitives/Shape.cs, UI/Geometry/Core/Geometry.cs, UI/Geometry/Core/Transform.cs, UI/Geometry/Parsing/PathMarkupParser.cs Implemented
Text layout primitives Shared text layout, wrapping, text rendering integration UI/Text/Core/TextLayout.cs, UI/Text/Types/TextWrapping.cs, UI/Rendering/Text/FontStashTextRenderer.cs Implemented
Text editing pipeline Selection/edit/clipboard buffer + textbox parity checks, plus rich document editing/undo/layout integration UI/Text/Editing/TextEditingBuffer.cs, UI/Text/Editing/TextSelection.cs, UI/Text/Editing/TextClipboard.cs, UI/Controls/Inputs/RichTextBox.cs, UI/Controls/Inputs/RichTextBox.FormattingEngine.cs, UI/Controls/Inputs/RichTextBox.Navigation.cs, UI/Controls/Inputs/RichTextBox.ListOperations.cs, UI/Controls/Inputs/RichTextBox.TableOperations.cs, InkkSlinger.Tests/TextEditingBufferTests.cs, InkkSlinger.Tests/TextPipelineParityTests.cs, InkkSlinger.Tests/RichTextDocumentTests.cs Implemented (tested)
Scrolling primitives ScrollViewer, ScrollBar, visibility and owner-scrolling behavior UI/Controls/Scrolling/ScrollViewer.cs, UI/Controls/Scrolling/ScrollBar.cs, InkkSlinger.Tests/ScrollViewerViewerOwnedScrollingTests.cs Implemented (tested)
Virtualization Virtualizing panel infrastructure for large item collections UI/Controls/Panels/VirtualizingStackPanel.cs, UI/Controls/Scrolling/VirtualizationEnums.cs, TODO.md (WPF Parity Gaps: virtualization checked) Implemented
Rendering invalidation Dirty region tracking + conditional draw scheduling UI/Rendering/DirtyRegions/DirtyRegionTracker.cs, UI/Managers/Root/Services/UiRootFrameState.cs, InkkSlinger.Tests/DirtyRegionTrackingTests.cs, InkkSlinger.Tests/ConditionalDrawTests.cs Implemented (tested)
Retained rendering + redraw scheduling Retained render-list sync, dirty-region tracking, and conditional draw scheduling UI/Managers/Root/Services/UiRootRetainedTree.cs, UI/Managers/Root/Services/UiRootDraw.cs, UI/Rendering/DirtyRegions/DirtyRegionTracker.cs, InkkSlinger.Tests/RenderQueueTests.cs, InkkSlinger.Tests/DirtyRegionTrackingTests.cs, InkkSlinger.Tests/ConditionalDrawTests.cs Implemented (regression coverage in progress)
Render queue and invalidation correctness Queue ordering and invalidation semantics in root draw/update pipeline UI/Managers/Root/UiRoot.cs, InkkSlinger.Tests/RenderQueueTests.cs, InkkSlinger.Tests/InvalidationFlagsTests.cs Implemented (tested)
Adorner infrastructure Adorner base/layer/decorator + anchored/handles authoring helpers (AnchoredAdorner, HandlesAdornerBase) with clipping/tracking coverage UI/Controls/Adorners/*, InkkSlinger.Tests/AdornerClippingTests.cs, InkkSlinger.Tests/AdornerParityDepthTests.cs Implemented (tested)
Control breadth snapshot 70 implemented controls out of 77 tracked WPF controls TODO.md (## WPF Control Coverage, computed: 70/77) Broad
Container/windowing primitives Window, Popup, ContextMenu, ToolTip, UserControl, Viewbox UI/Controls/Containers/*, UI/Controls/Items/ContextMenu.cs, InkkSlinger.Tests/ContextMenuEdgeParityTests.cs Implemented (ongoing depth)
Item and data controls ListBox, ListView, TreeView, Menu, DataGrid families UI/Controls/Items/*, UI/Controls/DataGrid/*, TODO.md (Current Workstream Snapshot) Implemented (ongoing depth)
Runtime telemetry/diagnostics UiRoot frame/draw/layout telemetry snapshot surfaces UI/Managers/Root/UiRootTypes.cs, UI/Diagnostics/*, InkkSlinger.Tests/UiRootTelemetryTests.cs Implemented (regression currently failing)
Regression safety net 87 focused test files covering core pipeline/regressions InkkSlinger.Tests/*Tests.cs (87 files) Implemented

Implemented Foundations

  • Dependency property system (DependencyObject, DependencyProperty, metadata/value-source model)
  • Routed event infrastructure (EventManager, routed args and routing strategies)
  • Input/focus pipeline integrated with UI update loop
  • Layout system across base elements and panel/control composition
  • XML markup loading via XamlLoader
  • Resources, styles, setters, triggers, and visual state primitives
  • Binding primitives (Path, Source, ElementName, RelativeSource)
  • Templates (ControlTemplate, DataTemplate, selectors/resolvers)
  • Storyboards, timelines, keyframes, easing, and animation manager
  • Virtualization primitives (VirtualizingStackPanel and scrolling infrastructure)
  • Transform-based ScrollViewer content scrolling for plain panel hosts by default, with attached-property opt-out (ScrollViewer.UseTransformContentScrolling="False")
  • Dirty-region-aware rendering with retained-list synchronization and conditional draw scheduling in UiRoot/UI/Rendering
  • Tooling support via schemas and x:Name source generation

Not Yet Implemented / Out of Scope (For Now)

This matrix is compiled from a full pass over TODO.md, UI/ source limitations (not supported guards), schema coverage, and missing-type checks.

Area Gap / Limitation Evidence State
Control coverage AccessText TODO.md (## WPF Control Coverage) Not implemented
Control coverage DocumentViewer TODO.md (## WPF Control Coverage) Not implemented
Control coverage Frame TODO.md (## WPF Control Coverage) Not implemented
Control coverage InkCanvas TODO.md (## WPF Control Coverage) Not implemented
Control coverage InkPresenter TODO.md (## WPF Control Coverage) Not implemented
Control coverage MediaElement TODO.md (## WPF Control Coverage) Not implemented
Control coverage Page TODO.md (## WPF Control Coverage) Not implemented
Parity track Advanced adorner/layout composition depth TODO.md (## WPF Parity Gaps) Implemented
Parity track Windowing/popup edge parity and interaction depth TODO.md (## WPF Parity Gaps) Ongoing
Data/view layer WPF CollectionView stack (current item/filter/sort/group) with CollectionViewSource UI/Binding/Collections/*, UI/Controls/Base/ItemsControl.cs, UI/Xaml/Core/XamlLoader.cs, InkkSlinger.Tests/CollectionViewCoreTests.cs, InkkSlinger.Tests/XamlCollectionViewParserTests.cs Implemented (tested)
XAML binding parser Unrecognized binding attributes are rejected UI/Xaml/Core/XamlLoader.cs (BuildBindingElement) Partial
XAML binding parser Unrecognized binding keys are rejected UI/Xaml/Core/XamlLoader.cs (ParseBinding) Partial
XAML RelativeSource parser Only Mode, AncestorType, AncestorLevel keys are accepted UI/Xaml/Core/XamlLoader.cs (ParseRelativeSource) Partial
XAML resources DynamicResource markup support for attribute-based dependency and attached properties; setter/trigger values remain deferred UI/Xaml/Core/XamlLoader.cs (TryParseDynamicResourceKey, TryApplyDynamicResourceExpression, ApplyAttachedProperty) Partial
XAML language General WPF MarkupExtension ecosystem No MarkupExtension base in UI/; parser uses explicit special cases Not implemented
XAML language Broader x: metadata surface (x:Class, x:Static, etc.) UI/Xaml/Core/XamlLoader.cs (ApplyAttributes handles x:Name/x:Key paths only) Partial
XAML tooling WPF designer/Blend/XAML compilation parity Runtime loader path in UI/Xaml/Core/XamlLoader.cs; no compile-time XAML toolchain in repo Not implemented
Resources/XAML Full merged-dictionary authoring + WPF merge edge semantics Runtime merge API in UI/Resources/Core/ResourceDictionary.cs; no dedicated merged-dictionary parse path in UI/Xaml/Core/XamlLoader.cs Partial
Styling/XAML Trigger actions are limited to SetValueAction, BeginStoryboard, StopStoryboard, PauseStoryboard, ResumeStoryboard, SeekStoryboard, RemoveStoryboard UI/Xaml/Core/XamlLoader.cs (BuildTriggerAction) Partial
Styling API MultiTrigger No matching type in UI/Styling/Triggers Not implemented
Styling API EventSetter No matching type in UI/Styling Not implemented
Commanding/Input API Declarative InputBinding / KeyGesture keyboard model (MouseGesture pending) UI/Input/Types/InputBinding.cs, UI/Input/Types/KeyBinding.cs, UI/Input/Types/KeyGesture.cs, UI/Controls/Base/UIElement.cs Partial
Commanding API RoutedUICommand surface No matching RoutedUICommand type in UI/Commanding Not implemented
Commanding API ICommandSource ecosystem parity across controls No matching ICommandSource type in UI/; command hookup is control-specific Partial
Container behavior UserControl custom ControlTemplate is blocked (NotSupportedException) UI/Controls/Containers/UserControl.cs Not supported
Geometry path parser Path commands S/s, T/t, A/a are rejected UI/Geometry/Parsing/PathMarkupParser.cs Partial
Text pipeline Virtual wrapped text layout optimization is intentionally disabled for correctness during resize reflow UI/Controls/Inputs/TextBox.cs (CanUseVirtualWrappedLayout) Temporarily disabled
Framework services Freezable semantics and related WPF service patterns No Freezable infrastructure in UI/ Not implemented
Layout parity Layout rounding / DPI-specific rounding parity (UseLayoutRounding-style behavior) No matching layout-rounding API in UI/Layout/UI/Controls Not implemented
Input stack Touch/stylus/tablet pipelines No corresponding types under UI/Input Not implemented
Accessibility UI automation / AutomationPeer layer No corresponding types in UI/; no automation tree APIs Not implemented
Rendering parity Pixel-identical WPF rendering/composition fidelity Framework targets MonoGame parity behavior, not WPF pixel-clone output Out of scope

UI Architecture Map

The following reflects UI-FOLDER-MAP.md (generated 2026-03-02):

  • UI/Animation: timelines, keyframes, easing, animation orchestration
  • UI/Binding: bindings, expressions, operations, command helpers
  • UI/Commanding: routed command infrastructure and shared editing command definitions
  • UI/Controls: base layer + buttons, containers, data grid, inputs (including split rich-text editing modules), items, panels, primitives, scrolling, selection, adorners
  • UI/Core: dependency properties, naming, dispatcher
  • UI/Events: routed event core, args, routing strategy
  • UI/Geometry: geometry and transform primitives + path parsing
  • UI/Input: focus/input managers and input state snapshots
  • UI/Layout: shared layout types (Thickness, alignment, orientation, etc.)
  • UI/Managers: layout manager, visual tree helper, UiRoot services and diagnostics
  • UI/Rendering: draw pipeline, dirty regions, text renderer
  • UI/Resources: dictionaries and resolution/application resources
  • UI/Styling: styles, setters, visual states, triggers, trigger actions
  • UI/Templating: control/data templates and trigger engine
  • UI/Text: text layout, flow-document model/editing/serialization, and rich document layout engine
  • UI/Xaml: runtime XML loading

Runtime Model

At runtime, the framework generally flows as:

  1. Input update and routing
  2. Animation update
  3. Layout pass when required
  4. UI tree update
  5. Conditional draw pass based on invalidation/redraw reasons
  6. If draw is scheduled: dirty-region or full-frame composition; otherwise host-level draw suppression

This keeps behavior deterministic while reducing unnecessary redraw work for large trees.

Markup Model

  • Markup files use .xml (WPF-inspired structure with x: support)
  • x:Name is supported and mapped to generated members
  • Schemas for editor assistance:
    • Schemas/InkkSlinger.UI.xsd
    • Schemas/Xaml2006.xsd

Build and Test

Prerequisite:

  • .NET SDK 10.x recommended
dotnet restore InkkSlinger.sln
dotnet build InkkSlinger.sln -c Release -v minimal
dotnet test InkkSlinger.Tests/InkkSlinger.Tests.csproj -c Release -v minimal

Test Environment

Primary validation machine for current development/testing:

  • OS: Windows 10 Pro (10.0.19045, 64-bit)
  • CPU: Intel Core i7-5600U @ 2.60GHz (2 cores / 4 logical processors)
  • RAM: 12 GB
  • GPU: Intel HD Graphics 5500

Running the Host Application

Mode Command
Current host mode dotnet run --project InkkSlinger.csproj

Current default launch surface is ControlsCatalogView. Legacy per-demo CLI mode switches were removed from host startup wiring.

Runtime Configuration

Environment-variable runtime switches were removed from the codebase. Runtime behavior is now controlled directly by in-code defaults and properties (for example Game1 and UiRoot setup).

Clipboard Interop Notes

  • TextClipboard maintains app-local plain/rich payloads and performs external clipboard sync for plain text.
  • On Windows runtime builds, external plain-text reads use a native Win32 clipboard path first, with PowerShell fallback only if native read fails.
  • Rich payloads (XamlPackage/Xaml/custom flow-doc format) remain app-local and are intentionally cleared when external plain text changes, preventing stale rich payload reuse.

Notes

  • The framework tracks parity gaps in TODO.md.
  • Usage is permission-based. See LICENSE and USAGE-PERMISSION-POLICY.md.

License and Usage

This repository is source-available under a permission-based model:

  • Default: permitted for non-commercial use under LICENSE
  • Commercial use: subscription, one-time perpetual option, or written waiver/grant (see LICENSE and USAGE-PERMISSION-POLICY.md)
  • If you make money from a product using InkkSlinger, assume commercial use
  • Significant contributors may be granted a free lifetime commercial license at maintainer discretion

Contributing and Governance

  • Contributing guide: CONTRIBUTING.md
  • Governance model: GOVERNANCE.md

Commercial License FAQ

  • See COMMERCIAL-LICENSE-FAQ.md for scenario-based examples

Releases

No releases published

Packages

 
 
 

Contributors

Languages