WpfFoundation 1.0.0-preview.7

This is a prerelease version of WpfFoundation.
dotnet add package WpfFoundation --version 1.0.0-preview.7
                    
NuGet\Install-Package WpfFoundation -Version 1.0.0-preview.7
                    
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="WpfFoundation" Version="1.0.0-preview.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WpfFoundation" Version="1.0.0-preview.7" />
                    
Directory.Packages.props
<PackageReference Include="WpfFoundation" />
                    
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 WpfFoundation --version 1.0.0-preview.7
                    
#r "nuget: WpfFoundation, 1.0.0-preview.7"
                    
#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 WpfFoundation@1.0.0-preview.7
                    
#: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=WpfFoundation&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=WpfFoundation&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
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
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