Kinnara/ModernWpf
Modern styles and controls for your WPF applications
Looks unmaintained — solo project with stale commits
worst of 4 axeslast commit was 2y ago; single-maintainer (no co-maintainers visible)…
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓MIT licensed
- ✓CI configured
- ⚠Stale — last commit 2y ago
Show 2 more →Show less
- ⚠Solo or near-solo (1 contributor active in recent commits)
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Mixed → Healthy if: 1 commit in the last 365 days; onboard a second core maintainer
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Forkable" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/kinnara/modernwpf)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/kinnara/modernwpf on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: Kinnara/ModernWpf
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/Kinnara/ModernWpf shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
AVOID — Looks unmaintained — solo project with stale commits
- MIT licensed
- CI configured
- ⚠ Stale — last commit 2y ago
- ⚠ Solo or near-solo (1 contributor active in recent commits)
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live Kinnara/ModernWpf
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/Kinnara/ModernWpf.
What it runs against: a local clone of Kinnara/ModernWpf — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in Kinnara/ModernWpf | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 666 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of Kinnara/ModernWpf. If you don't
# have one yet, run these first:
#
# git clone https://github.com/Kinnara/ModernWpf.git
# cd ModernWpf
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of Kinnara/ModernWpf and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "Kinnara/ModernWpf(\\.git)?\\b" \\
&& ok "origin remote is Kinnara/ModernWpf" \\
|| miss "origin remote is not Kinnara/ModernWpf (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "ModernWpf.Controls/ModernWpf.Controls.csproj" \\
&& ok "ModernWpf.Controls/ModernWpf.Controls.csproj" \\
|| miss "missing critical file: ModernWpf.Controls/ModernWpf.Controls.csproj"
test -f "ModernWpf.Controls/CommandBar/CommandBar.cs" \\
&& ok "ModernWpf.Controls/CommandBar/CommandBar.cs" \\
|| miss "missing critical file: ModernWpf.Controls/CommandBar/CommandBar.cs"
test -f "ModernWpf.Controls/Common/SharedHelpers.cs" \\
&& ok "ModernWpf.Controls/Common/SharedHelpers.cs" \\
|| miss "missing critical file: ModernWpf.Controls/Common/SharedHelpers.cs"
test -f "ModernWpf.Controls/Flyout/FlyoutBase.cs" \\
&& ok "ModernWpf.Controls/Flyout/FlyoutBase.cs" \\
|| miss "missing critical file: ModernWpf.Controls/Flyout/FlyoutBase.cs"
test -f "ModernWpf.Controls/ListView/ListViewBase.cs" \\
&& ok "ModernWpf.Controls/ListView/ListViewBase.cs" \\
|| miss "missing critical file: ModernWpf.Controls/ListView/ListViewBase.cs"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 666 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~636d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/Kinnara/ModernWpf"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
ModernWpf is a comprehensive WPF control library that applies Fluent Design System aesthetics to Windows desktop applications. It provides restyled versions of native WPF controls (Button, TextBox, ComboBox, DataGrid, etc.) plus new controls ported from Windows UI Library (AutoSuggestBox, CommandBar, ContentDialog, NumberBox) with built-in light/dark/high-contrast theming. The core goal is enabling WPF developers to build modern, Windows-10/11-style applications without manual XAML styling. Monorepo structure: ModernWpf.Controls/ is the main control library organized by control type (AutoSuggestBox/, CommandBar/, CommandBarFlyout/) with separate .cs files for code-behind, .xaml for templates, and .properties.cs for dependency property definitions. ModernWpf.Controls/Common/ contains shared utilities (CollectionHelper, Extensions, LightDismissOverlayMode). Build config centralized in Directory.Build.props and Directory.Build.targets.
👥Who it's for
WPF desktop application developers targeting .NET Framework 4.5+ / .NET Core 3+ / .NET 5+ who need modern UI aesthetics without designing custom control templates. Contributors are typically C# developers familiar with XAML and WPF dependency properties who want to extend the control library or improve theme consistency.
🌱Maturity & risk
Active and production-ready. The project has a substantial codebase (~3.7MB C#), established NuGet packages (ModernWpfUI, ModernWpfUI.MahApps), CI/CD via GitHub Actions (build.yml, label.yml), and targets multiple .NET versions including .NET 5+. Last visible activity shows automated workflows and organized folder structure indicating ongoing maintenance, though exact commit recency is not exposed in file metadata.
Standard open source risks apply.
Active areas of work
The repository is actively maintained with GitHub Actions workflows for building and labeling issues. No specific recent commits visible in file listing, but the organized CI setup (build.yml, label.yml) and editorconfig standardization (.editorconfig files present) indicate ongoing development practices. The presence of .github/workflows and structured property files suggests active release/deployment pipeline management.
🚀Get running
git clone https://github.com/Kinnara/ModernWpf.git
cd ModernWpf
# Open ModernWpf.sln in Visual Studio or
dotnet build
No explicit package.json or npm commands visible; this is a pure C# project compiled with msbuild/dotnet CLI.
Daily commands:
Open ModernWpf.sln in Visual Studio 2017+ and build the solution. For CLI: dotnet build ModernWpf.sln. No dev server needed (WPF is desktop only). To see controls in action, build and run example/demo projects if present (not shown in file list but typical for UI libraries).
🗺️Map of the codebase
ModernWpf.Controls/ModernWpf.Controls.csproj— Project manifest defining all control assemblies, dependencies, and NuGet package configuration for the entire library.ModernWpf.Controls/CommandBar/CommandBar.cs— Core CommandBar implementation—a foundational UI component that multiple other controls depend on; understanding its architecture is essential for extending the control system.ModernWpf.Controls/Common/SharedHelpers.cs— Shared utility functions and helpers used across all controls; changes here impact the entire codebase.ModernWpf.Controls/Flyout/FlyoutBase.cs— Base class for all flyout-based popup controls (Flyout, MenuFlyout, CommandBarFlyout); central to the popup behavior architecture.ModernWpf.Controls/ListView/ListViewBase.cs— Abstract base for ListView and GridView controls; defines the core selection and item management behavior for list-based controls.ModernWpf.Controls/ContentDialog/ContentDialog.cs— Dialog modal control providing async result handling and button deferrals; critical for understanding the dialog pattern used throughout the library.Directory.Build.props— Central build configuration applied to all projects; defines version, compiler settings, and shared properties across the solution.
🛠️How to make changes
Add a New Modern Control
- Create a new folder under ModernWpf.Controls/{ControlName}/ (e.g., ModernWpf.Controls/MyControl/) (
ModernWpf.Controls/MyControl/) - Create the C# code-behind class inheriting from Control or UserControl, following the pattern in ModernWpf.Controls/DropDownButton/DropDownButton.cs with dependency properties and routed events (
ModernWpf.Controls/MyControl/MyControl.cs) - Create MyControl.xaml with a ControlTemplate defining the visual tree and bindings to dependency properties (
ModernWpf.Controls/MyControl/MyControl.xaml) - Add any helper classes (e.g., event args) in additional .cs files following the pattern of ModernWpf.Controls/AutoSuggestBox/AutoSuggestBoxTextChangedEventArgs.cs (
ModernWpf.Controls/MyControl/MyControlEventArgs.cs) - Register the control in ModernWpf.Controls.csproj and add theme resource dictionaries (Light/Dark/HighContrast variants) if custom styling is required (
ModernWpf.Controls/ModernWpf.Controls.csproj)
Add a New Flyout-Based Popup
- Create a new class inheriting from FlyoutBase in ModernWpf.Controls/Flyout/ folder, mirroring the structure of ModernWpf.Controls/MenuFlyout/MenuFlyout.cs (
ModernWpf.Controls/Flyout/MyFlyout.cs) - Override CreatePresenter() to return a custom FlyoutPresenter or reuse FlyoutPresenter, and define any custom content/layout properties (
ModernWpf.Controls/Flyout/MyFlyout.cs) - Create MyFlyout.xaml with the control template if custom layout is needed, following ModernWpf.Controls/Flyout/FlyoutPresenter.xaml (
ModernWpf.Controls/Flyout/MyFlyout.xaml) - Register the flyout type in ModernWpf.Controls.csproj and add to theme dictionaries to inherit light/dark/high-contrast styling (
ModernWpf.Controls/ModernWpf.Controls.csproj)
Customize Theme Colors (Light/Dark/High Contrast)
- Locate or create theme resource dictionaries in the Themes folder (typically referenced in App.xaml or theme XAML files) (
ModernWpf.Controls/) - Override SolidColorBrush and other theme resources (e.g., SystemControlForeground*, AccentBrush) following the naming convention seen in ModernWpf.Controls/ContentDialog/ContentDialog.xaml and other control templates (
ModernWpf.Controls/ContentDialog/ContentDialog.xaml) - Test changes by creating a test app that applies the theme via Application.Resources in App.xaml, importing your custom theme dictionary (
ModernWpf.Controls/ModernWpf.Controls.csproj)
Add a Dependency Property to an Existing Control
- Open the control's main .cs file (e.g., ModernWpf.Controls/CommandBar/CommandBar.cs) (
ModernWpf.Controls/CommandBar/CommandBar.cs) - Define a new public static readonly DependencyProperty using DependencyProperty.Register(), following the pattern in CommandBar.cs or use a properties partial file (e.g., CommandBar.properties.cs) if one exists (
ModernWpf.Controls/CommandBar/CommandBar.properties.cs) - Add a CLR property wrapper that gets/sets the dependency property value (
ModernWpf.Controls/CommandBar/CommandBar.properties.cs) - Update the control's XAML template (e.g., ModernWpf.Controls/CommandBar/CommandBar.xaml) to bind UI elements to the new property using {TemplateBinding} (
ModernWpf.Controls/CommandBar/CommandBar.xaml)
🔧Why these technologies
- WPF (Windows Presentation Foundation) — Primary framework target
🪤Traps & gotchas
XAML namespace registration: The xmlns:ui='http://schemas.modernwpf.com/2019' must be correctly declared in consuming apps (see README) or controls won't be recognized. Assembly binding redirects: If targeting .NET Framework 4.5+ with NuGet packages, binding redirects may be auto-generated; check App.config in consuming projects. Theme initialization: ThemeResources and XamlControlsResources must be merged into Application.Resources before controls are created, or styling will be missing (common gotcha). Visual State Manager (VSM) states: Controls rely on VSM states for light/dark/high-contrast theming; custom styling that doesn't respect VSM state groups (e.g., 'CommonStates', 'ThemeStates') may break theme switching. Dependency property callbacks: Several controls use PropertyChanged callbacks in .properties.cs files; modifying these without understanding the control lifecycle can cause rendering issues.
🏗️Architecture
🔗Related repos
microsoft/microsoft-ui-xaml— Official Windows UI Library (WinUI) that ModernWpf ports controls from; the upstream source of design language and control behavior reference implementationsMahApps/MahApps.Metro— Competing WPF theming library with similar goals (modern desktop UI); ModernWpf even ships ModernWpfUI.MahApps package suggesting integration/compatibility effortsControlzEx/ControlzEx— Shared WPF control utilities library often used alongside theme libraries; provides base classes and helpers (DropDownButton, MultiSelectComboBox) that complement ModernWpf stylingdotnet/wpf— Official WPF runtime repository; ModernWpf depends on stable WPF APIs and targets specific .NET/Framework versions tracked in that repoCommunityToolkit/WindowsCommunityToolkit— Windows Community Toolkit contains additional UWP and WPF helpers; overlaps with ModernWpf's control library goals and provides complementary utilities
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add unit tests for Common helper utilities
The ModernWpf.Controls/Common directory contains critical utility classes (Extensions.cs, SharedHelpers.cs, PopupHelper.cs, SelectorHelper.cs) that are used throughout the control library, but no test project exists in the repo. These utilities handle popup positioning, DPI awareness, collection operations, and control state management. Adding unit tests would prevent regressions and make refactoring safer.
- [ ] Create a new test project (ModernWpf.Controls.Tests or similar) targeting .NET Framework 4.5+ and .NET 5+
- [ ] Add unit tests for ModernWpf.Controls/Common/Extensions.cs (especially any LINQ or reflection utilities)
- [ ] Add unit tests for ModernWpf.Controls/Common/PopupRepositionHelper.cs (edge cases for popup positioning)
- [ ] Add unit tests for ModernWpf.Controls/Common/SelectorHelper.cs (selection logic)
- [ ] Integrate test project into .github/workflows/build.yml to run tests on PR
Add integration tests workflow for AutoSuggestBox and CommandBar controls
The repo contains complex interactive controls (AutoSuggestBox, CommandBar, CommandBarFlyout) with multiple state management files and visual state managers, but no automated tests verify their behavior. The .github/workflows/build.yml exists but likely only compiles. Adding a UI testing workflow would catch regressions in control interactions, keyboard handling, and visual states.
- [ ] Create a sample WPF test application in a new ModernWpf.SampleApp.Tests directory demonstrating AutoSuggestBox interactions
- [ ] Add a new GitHub Actions workflow (e.g., .github/workflows/ui-tests.yml) using a headless WPF testing tool or xunit with WpfTestRunner
- [ ] Write integration tests for ModernWpf.Controls/AutoSuggestBox/ covering text input, suggestion selection, and event firing
- [ ] Write integration tests for ModernWpf.Controls/CommandBar/ covering overflow behavior and label position changes
- [ ] Document test execution in a CONTRIBUTING.md or TESTING.md file
Refactor AppBarElement implementation into separate base class modules
The CommandBar directory contains multiple interdependent classes (AppBarButton.cs, AppBarToggleButton.cs, AppBarSeparator.cs, AppBarElementProperties.cs, AppBarElementApplicationViewState.cs, AppBarElementVisualStateManager.cs) that implement the ICommandBarElement interface. These are tightly coupled and scattered across multiple files, making the code harder to maintain. Extracting common AppBarElement base functionality would reduce duplication and improve clarity.
- [ ] Create ModernWpf.Controls/CommandBar/AppBarElementBase.cs containing shared ICommandBarElement implementation from AppBarButton.cs and AppBarToggleButton.cs
- [ ] Move common property logic from AppBarElementProperties.cs into AppBarElementBase.cs or a dedicated ControlProperties mixin pattern
- [ ] Refactor AppBarButton.cs and AppBarToggleButton.cs to inherit from AppBarElementBase instead of repeating code
- [ ] Create AppBarElementVisualStateHelper.cs to extract duplicated visual state logic from AppBarElementVisualStateManager.cs
- [ ] Verify all existing tests still pass and update references in CommandBar.cs and CommandBarFlyoutCommandBar.cs
🌿Good first issues
- Add unit tests for ModernWpf.Controls/Common/CollectionHelper.cs and ModernWpf.Controls/Common/Extensions.cs — these are shared utilities with no visible test coverage, and adding tests would improve code safety and documentation by example.
- Expand documentation in AutoSuggestBoxHelper.cs with inline code examples and XML doc comments explaining the helper methods' purpose — the helper class lacks clear API documentation, making it hard for contributors to understand when to use each method.
- Create a simple demo/example XAML file showcasing all themed controls (Button, TextBox, ComboBox, NumberBox, AutoSuggestBox) in light/dark mode side-by-side — the README shows screenshots but the codebase lacks a runnable minimal example that developers can copy.
📝Recent commits
Click to expand
Recent commits
83ecedc— Port microsoft/microsoft-ui-xaml#4978 (#671) (Kinnara)f68f1e4— Port microsoft/microsoft-ui-xaml#4974 (#670) (Kinnara)ef9e56d— Port microsoft/microsoft-ui-xaml#4957 (#669) (Kinnara)3062a6b— Port microsoft/microsoft-ui-xaml#4915 (#668) (Kinnara)708d6b2— Port microsoft/microsoft-ui-xaml#4953 (#667) (Kinnara)e658d94— Port microsoft/microsoft-ui-xaml#4960 (#665) (Kinnara)2deae35— Port microsoft/microsoft-ui-xaml#4927 (#664) (Kinnara)d98c634— Port microsoft/microsoft-ui-xaml#4920 (#663) (Kinnara)9eb38ca— Port microsoft/microsoft-ui-xaml#4932 (#662) (Kinnara)58f337c— Fix high contrast resources (Kinnara)
🔒Security observations
The ModernWpf codebase appears to be a well-structured UI library with limited direct security risks at the code level. However, critical security concerns include: (1) Lack of visible dependency vulnerability tracking despite multi-platform .NET support, (2) No documented security policy for vulnerability disclosure, and (3) Limited visibility into input validation strategies across controls that process user data (AutoSuggestBox, ContentDialog, etc.). The library's architecture suggests proper separation of concerns and use of safe WPF framework patterns, but comprehensive dependency scanning and security documentation are recommended before use in sensitive applications.
- Medium · Missing or Incomplete Dependency Vulnerability Tracking —
Package dependencies (not provided). The provided dependency file content is empty. Without visibility into NuGet package dependencies, it's impossible to detect known vulnerabilities in third-party libraries. The project targets multiple .NET versions (Framework 4.5+, Core 3+, 5+) which may have varying security patch levels. Fix: Implement automated dependency scanning using tools like NuGet Package Analyzer, Snyk, or OWASP Dependency-Check. Regularly audit and update dependencies. Include a lock file or packages.config to track exact versions. - Low · Potential XSS Risk in AutoSuggestBox Implementation —
ModernWpf.Controls/AutoSuggestBox/AutoSuggestBox.cs and related files. The AutoSuggestBox control processes user input and renders suggestions. If suggestion items are not properly sanitized before rendering in WPF controls, there could be potential for injection attacks depending on how the control is used with external data sources. Fix: Ensure all user-supplied data used in AutoSuggestBox suggestions is properly validated and sanitized. Document secure usage patterns for developers. Add input validation examples in documentation. - Low · Incomplete Security Documentation —
Repository root. No visible security policy file (SECURITY.md) or security guidelines for contributors. This makes it difficult for security researchers to report vulnerabilities responsibly. Fix: Create a SECURITY.md file defining responsible disclosure procedures, supported versions, and security contact information. Consider using GitHub's built-in security advisory features. - Low · Broad File Access in PopupHelper/PopupRepositionHelper —
ModernWpf.Controls/Common/PopupHelper.cs and ModernWpf.Controls/Common/PopupRepositionHelper.cs. PopupHelper and PopupRepositionHelper components interact with window positioning and rendering. Depending on implementation, there could be potential for UI spoofing or information disclosure if not properly isolated. Fix: Review PopupHelper implementations to ensure they cannot be exploited for UI spoofing attacks. Validate all window positioning calculations. Consider principle of least privilege for UI rendering permissions.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.