Open
Description
Note
Originally from #449.
Overview
Tracking issue for the new DependencyProperty
generator, for UWP (both .NET Native and .NET 9) and WinUI 3.
This is what using the new generator looks like:
[GeneratedDependencyProperty]
public string? Name { get; set; }
It only supports instance properties. Attached properties are not currently supported.
Remaining task
Here's a few remaining tasks to track work:
- Codegen for
DefaultValueCallback
- Improve formatting for
PropertyMetadata
construction - Diagnostic for using
DefaultValue
andDefaultValueCallback
at the same time - Diagnostic for
DefaultValueCallback
set tonull
- Diagnostic for
DefaultValueCallback
not matching an existing method - Diagnostic for
DefaultValueCallback
matching an invalid method (eg. wrong signature) - Diagnostic for properties that end with the "Property" suffix
- Handle generic containing types
- Handle
default(T)
for default values on unconstrained generic type parameters - Diagnostics for
[NotNull]
on property getters