Skip to content

Dependency Properties are declared as fields #2953

Closed

Description

@MartinZikmund

Current behavior

Many DependencyProperty declarations in Uno are static readonly fields, while UWP seems to use static read-only properties, for example in Button, Uno has:

public static readonly DependencyProperty FlyoutProperty = ...

But UWP has:

public static DependencyProperty FlyoutProperty { get; } = ...

This is due to the fact that the "field" syntax was used in WPF and propdp in VS still generates this.

Expected behavior

Class member kinds should match.

How to reproduce it (as minimally and precisely as possible)

N/A

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    on Apr 7, 2020
  2. changed the title [-]DependencyProperties are declared as fields[/-] [+]Dependency Properties are declared as fields[/+] on Apr 7, 2020
  3. added and removed
    triage/untriaged
    on Apr 7, 2020
  4. MartinZikmund commented on Apr 7, 2020

    @MartinZikmund
    MemberAuthor

    @jeromelaban This can be added to #2240

  5. added this to the 3.1 milestone on Aug 29, 2020
  6. jeromelaban commented on Aug 31, 2020

    @jeromelaban
    Member

    This was fixed in 3.0

  7. added
    project/core-tools 🛠️
    on Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugproject/core-tools 🛠️

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions