Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropertyGrid: objects not expandable #1553

Closed
RussKie opened this issue Aug 2, 2019 · 12 comments
Closed

PropertyGrid: objects not expandable #1553

RussKie opened this issue Aug 2, 2019 · 12 comments
Labels
area-controls-PropertyGrid PropertyGrid and editor related issues 🪲 bug Product bug (most likely) 💥 regression-preview Regression from a preview release tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework
Milestone

Comments

@RussKie
Copy link
Member

RussKie commented Aug 2, 2019

  • 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.

@RussKie RussKie added this to the 3.0.0-Preview9 milestone Aug 2, 2019
@zsd4yr
Copy link
Contributor

zsd4yr commented Aug 16, 2019

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

@zsd4yr zsd4yr added 🪲 bug Product bug (most likely) tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework labels Aug 16, 2019
@weltkante
Copy link
Contributor

weltkante commented Aug 16, 2019

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.

@DustinCampbell
Copy link
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.

@RussKie
Copy link
Member Author

RussKie commented Sep 5, 2019

Thank you @hughbe 🚀

@danmoseley danmoseley reopened this Sep 5, 2019
@danmoseley
Copy link
Member

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

cc @safern.

@danmoseley
Copy link
Member

(if not, please re-close )

@zsd4yr
Copy link
Contributor

zsd4yr commented Sep 5, 2019

@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

@danmoseley
Copy link
Member

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

@RussKie RussKie modified the milestones: 3.0-GA, 3.1 Sep 16, 2019
@RussKie RussKie added the area-controls-PropertyGrid PropertyGrid and editor related issues label Oct 2, 2019
@RussKie
Copy link
Member Author

RussKie commented Oct 2, 2019

@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

@RussKie RussKie added the 💥 regression-preview Regression from a preview release label Oct 2, 2019
@weltkante
Copy link
Contributor

weltkante commented Oct 2, 2019

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

@safern
Copy link
Member

safern commented Oct 2, 2019

@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

@RussKie
Copy link
Member Author

RussKie commented Oct 3, 2019

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.

@RussKie RussKie closed this as completed Oct 3, 2019
@RussKie RussKie removed this from the 3.1 milestone Oct 3, 2019
@karelz karelz added this to the 3.0-GA milestone Dec 19, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-PropertyGrid PropertyGrid and editor related issues 🪲 bug Product bug (most likely) 💥 regression-preview Regression from a preview release tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework
Projects
None yet
Development

No branches or pull requests

7 participants