Skip to content

🧪 [Experiment] DependencyPropertyGenerator #621

Open
@Sergio0694

Description

@Sergio0694

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 and DefaultValueCallback at the same time
  • Diagnostic for DefaultValueCallback set to null
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    experiment 🧪Used to track issues that are experiments (or their linked discussions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions