WpfFoundation 1.0.0-preview.7
dotnet add package WpfFoundation --version 1.0.0-preview.7
NuGet\Install-Package WpfFoundation -Version 1.0.0-preview.7
<PackageReference Include="WpfFoundation" Version="1.0.0-preview.7" />
<PackageVersion Include="WpfFoundation" Version="1.0.0-preview.7" />
<PackageReference Include="WpfFoundation" />
paket add WpfFoundation --version 1.0.0-preview.7
#r "nuget: WpfFoundation, 1.0.0-preview.7"
#:package WpfFoundation@1.0.0-preview.7
#addin nuget:?package=WpfFoundation&version=1.0.0-preview.7&prerelease
#tool nuget:?package=WpfFoundation&version=1.0.0-preview.7&prerelease
WpfFoundation
Reusable WPF infrastructure and an interactive Gallery for .NET 10, using the native Windows Fluent theme and CommunityToolkit.Mvvm, without Prism.
The library is being built in slices; see the implementation plan. Preview packages (1.0.0-preview.N) may change their API before 1.0.0.
Getting started
Reference the package and pin its version in Directory.Packages.props:
<PackageReference Include="WpfFoundation" />
Merge the single entry dictionary once in App.xaml and keep ThemeMode on the application so the Fluent theme applies:
<Application ThemeMode="System">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/WpfFoundation;component/Themes/WpfFoundation.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Every resource key the library defines starts with Wf, so it cannot collide with application resources. Setting ThemeMode is still reported as experimental (WPF0001), so applications that set it suppress that warning.
Repository
| Project | Purpose |
|---|---|
src/WpfFoundation |
The library and NuGet package |
src/WpfFoundation.Gallery |
Interactive examples and copyable usage XAML |
tests/WpfFoundation.Tests |
Behavior and WPF integration tests |
tools/XamlDesignCheck |
The XAML design check that CI runs here and in the apps |
Build and test with the .NET 10 SDK pinned in global.json:
dotnet build WpfFoundation.sln
dotnet test WpfFoundation.sln
CI runs the XAML design check, then builds, tests and packs every push. A v* tag publishes the package and symbols to NuGet.org and attaches a framework-dependent Gallery ZIP to the GitHub release.
The Gallery shows what WpfFoundation adds. For stock Fluent controls and for colors, typography, spacing, corner radius and icons, use the Design Guidance section of Microsoft's WPF Gallery app.
XAML design check
tools/XamlDesignCheck fails CI when XAML bypasses the Fluent theme: literal colors or SystemColors, margins and padding off the spacing steps (0, 4, 8, 12, 16, 24, 32, 48), literal font sizes, weights or families, and literal corner radii. Run it before opening a UI pull request:
dotnet run --project tools/XamlDesignCheck
A justified exception goes in xaml-design-allowlist.txt with its reason. Applications run the same check from their CI:
- uses: gbolotin/WpfFoundation/.github/actions/xaml-design-check@<commit>
Code adapted from the owner's other repositories is recorded in provenance notes.
Licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- CommunityToolkit.Mvvm (>= 8.4.2)
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 |
|---|---|---|
| 1.0.0-preview.7 | 0 | 10/5/2026 |
| 1.0.0-preview.6 | 40 | 10/5/2026 |
| 1.0.0-preview.5 | 26 | 10/5/2026 |
| 1.0.0-preview.4 | 45 | 10/4/2026 |
| 1.0.0-preview.3 | 85 | 10/3/2026 |
| 1.0.0-preview.2 | 75 | 10/2/2026 |
| 1.0.0-preview.1 | 42 | 10/2/2026 |