Skip to content

PropertyGrid: objects not expandable #1553

Closed

Description

@RussKie
  • Have you experienced this same bug with .NET Framework?: No

Problem description:

The property grid does not allow to expand complex objects if those aren't at the top level of object hierarchy.

image

Actual behavior:

image
image

Expected behavior:

Object at all levels are expandable.

Minimal repro:

Run WinFormsControlsClassicTests and WinformsControlsTest side-by-side, click [Collection Editors] button and compare the property grids.

Activity

  1. added this to the 3.0.0-Preview9 milestone on Aug 2, 2019
  2. zsd4yr commented on Aug 16, 2019

    @zsd4yr
    Contributor

    @DustinCampbell, @AdamYoblick and I feel like you mentioned something here -- do you have any thoughts?

  3. added
    🪲 bug
    tenet-compatibility
    on Aug 16, 2019
  4. weltkante commented on Aug 16, 2019

    @weltkante
    Contributor

    ComponentConverter should be the one responsible for expanding in the property grid (it overrides GetProperties, same as ExpandableObjectConverter does). It is linked on Desktop Framework via a TypeConverterAttribute attribute on the IComponent interface, but I think its missing in corefx even though the documentation says it should still be there.

  5. DustinCampbell commented on Sep 5, 2019

    @DustinCampbell
    Member

    @DustinCampbell, @AdamYoblick and I feel like you mentioned something here -- do you have any thoughts?

    This is about the .NET Core property grid and not the framework version, which gets used in VS. So, I don't really have anything to add.

  6. RussKie commented on Sep 5, 2019

    @RussKie
    ContributorAuthor

    Thank you @hughbe 🚀

  7. danmoseley commented on Sep 5, 2019

    @danmoseley

    reopening since apparently this is desired for 3.0 GA which means it would need a port PR.

    cc @safern.

  8. danmoseley commented on Sep 5, 2019

    @danmoseley

    (if not, please re-close )

  9. zsd4yr commented on Sep 5, 2019

    @zsd4yr
    Contributor

    @danmosemsft will someone cherry pick the change in corefx master into the 3.0 GA branch or should @hughbe make that PR?

    @hughbe please make a PR in CoreFX with this change targeting their 3.0 GA branch

  10. danmoseley commented on Sep 10, 2019

    @danmoseley

    @RussKie perhaps this can be closed - maybe after our code flows and you've validated ?

  11. modified the milestones: 3.0-GA, 3.1 on Sep 16, 2019
  12. added
    area-controls-PropertyGrid
    on Oct 2, 2019
  13. RussKie commented on Oct 2, 2019

    @RussKie
    ContributorAuthor

    @danmosemsft this looks like fixed in 5.0 but 3.1 is still broken. Is there anything we can do to get it fixed in 3.1 as well?

    • 3.1 Preview1
      image

    • 5.0
      image

  14. added
    💥 regression-preview
    on Oct 2, 2019
  15. weltkante commented on Oct 2, 2019

    @weltkante
    Contributor

    Seems to work for me in 3.0 GA, can't test 3.1 right now

    example
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
    
            PropertyGrid pg;
            Controls.Add(pg = new PropertyGrid() { Dock = DockStyle.Fill });
            pg.SelectedObject = new Dummy();
        }
    
    }
    
    public class Dummy
    {
        public ListView MyListView { get; } = new ListView();
    }

    image

  16. safern commented on Oct 2, 2019

    @safern
    Member

    @RussKie the fix seems to be in the 3.1 branch... have you guys consumed the latest Microsoft.NETCore.App from 3.1? Would you mind checking what version you tested agains?

    Here's the source code for 3.1: https://github.com/dotnet/corefx/blob/release/3.1/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs#L139

  17. RussKie commented on Oct 3, 2019

    @RussKie
    ContributorAuthor

    Thank you for the confirmation.
    I have created brand new apps targeting 3.0 and 3.1 outside the repo, and in both cases it worked.

  18. removed this from the 3.1 milestone on Oct 3, 2019
  19. added this to the 3.0-GA milestone on Dec 19, 2019
  20. ghost locked as resolved and limited conversation to collaborators on Feb 5, 2022
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

    🪲 bug💥 regression-previewarea-controls-PropertyGridtenet-compatibility

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions