| name | dotnet-10 |
| description | Provides up-to-date knowledge about .NET 10 and C# 14 for WPF application development. Use this skill when developing WPF apps targeting .NET 10, or when asked about .NET 10 / C# 14 features. |
.NET 10 + C# 14 WPF Development Reference
.NET 10 is an LTS release (released November 2025, supported for 3 years). The paired language version is C# 14. The required tooling is .NET 10 SDK and Visual Studio 2026.
Project Setup
Target framework: net10.0-windows
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>
C# 14 New Language Features
field keyword (backed properties)
Access the compiler-generated backing field inside a property accessor without declaring a separate field:
public string Name
{
get;
set => field = value ?? throw new ArgumentNullException(nameof(value));
}
Extension members
New extension block syntax supports extension properties (instance and static) in addition to extension methods:
public static class MyExtensions
{
extension(IEnumerable<int> source)
{
public bool IsEmpty => !source.Any();
}
}
Use sequence.IsEmpty as if it were an instance property.
Null-conditional assignment
?. can now appear on the left-hand side of an assignment:
if (customer is not null) customer.Order = GetCurrentOrder();
customer?.Order = GetCurrentOrder();
Also works with compound assignment (+=, -=, etc.). Increment/decrement (++/--) are not supported.
nameof with unbound generic types
nameof(List<>)
Lambda parameter modifiers without explicit types
TryParse<int> parse = (text, out result) => int.TryParse(text, out result);
Implicit Span<T> / ReadOnlySpan<T> conversions
C# 14 adds first-class implicit conversions between Span<T>, ReadOnlySpan<T>, and T[].
partial constructors and events
Instance constructors and events can now be declared as partial members (one defining declaration, one implementing declaration).
User-defined compound assignment and increment/decrement operators
Types can now define +=, -=, ++, --, etc.
WPF Changes in .NET 10
Grid short-form syntax (new)
Column/row definitions can be written inline as a string:
<!-- Before -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="300" />
</Grid.ColumnDefinitions>
</Grid>
<!-- .NET 10 -->
<Grid ColumnDefinitions="1*, Auto, 300" RowDefinitions="Auto, *, 25" />
MessageBox new buttons and results (new)
MessageBoxButton now includes: AbortRetryIgnore, RetryCancel, CancelTryContinue.
MessageBoxResult now includes: Abort, Retry, Ignore, TryAgain, Continue.
Clipboard changes
WPF and Windows Forms now share the same clipboard API. BinaryFormatter-based clipboard methods are obsoleted; use JSON-based alternatives instead.
Fluent style (in progress)
.NET 10 expanded Fluent UI style support to additional controls: DatePicker, GridSplitter, GridView, GroupBox, Hyperlink, Label, NavigationWindow, RichTextBox, TextBox.
Fluent style support is still incomplete; not all controls are covered yet.
Performance improvements
- Internal data structures replaced with
ReadOnlyCollection<T> to reduce allocations.
- Optimized font rendering, dynamic resources, XAML parsing, and cache operations.
Removed legacy code
Unused Code Access Security (CAS) code and XBAP-related code have been removed. Do not reference CAS APIs in .NET 10 WPF code.
.NET 10 Runtime and SDK
- JIT: improved inlining, method devirtualization, and stack allocation optimization.
- AVX10.2 support added.
- NativeAOT enhancements.
- SDK:
dotnet test now supports Microsoft.Testing.Platform; dotnet tool exec for one-shot tool execution.
- Post-quantum cryptography: ML-DSA with HashML-DSA support, Composite ML-DSA, AES KeyWrap with Padding.
- Networking:
WebSocketStream API, TLS 1.3 on macOS.
Guidance for Code Generation
- Always use
net10.0-windows as the target framework for WPF projects.
- Use
<Nullable>enable</Nullable> and <ImplicitUsings>enable</ImplicitUsings>.
- Prefer the
field keyword instead of explicit backing fields for simple validation cases.
- Use the Grid inline syntax (
ColumnDefinitions="...") for conciseness.
- Do not use
BinaryFormatter for clipboard operations; use the new JSON-based clipboard APIs.
- Do not reference CAS-related APIs (they have been removed).
- C# 14 is the default language version when targeting .NET 10; no explicit
<LangVersion> needed.
Reference Links