Resize grip is missing in PropertyGrid DropDown editor after update to net5.0-windows
See original GitHub issue-
.NET Core Version: .Net 5 (net5.0-windows)
-
Have you experienced this same bug with .NET Framework?: No
Problem description:
I have simple drop-down editor IsDropDownResizable => true
and GetEditStyle => UITypeEditorEditStyle.DropDown
. For net472
or netcoreapp3.1
there’s resize grip under drop-down editor. After update to net5.0-windows
resize grip is missing.
Expected behavior: Resize grip is displayed under editor control.
Minimal repro:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
propertyGrid1.SelectedObject = new Foo(); // propertyGrid1 added via designer
}
}
public sealed class Foo
{
[Editor(typeof(FooBarEditor), typeof(UITypeEditor))]
public string Bar { get; set; }
}
public sealed class FooBarEditor : UITypeEditor
{
public override bool IsDropDownResizable => true;
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
=> UITypeEditorEditStyle.DropDown;
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
((IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)))
.DropDownControl(new Panel { BackColor = Color.Yellow });
return value;
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
RadPropertyGrid custom dropdown editor not changing
Hello, I've got a custom editor for some PropertyGrid items that is displaying in the grid values correctly, and the subsequent drop down...
Read more >Derive PropertyGrid dropdown list from property that is an ...
This interfaces the property to the custom editor. value contains the value passed from the property. It can be of any object type....
Read more >VCL, ASP.NET, Windows Mobile, .NET controls & ...
DropDownAlwaysVisible = true Update : TAdvRatingGrid v1.4.0.0 ... Improved : Image resizing - Fixed : Issue with Find() function - Fixed : Insert...
Read more >Release Notes
Added new parameter to the 'update' function of the FirmwareUpdater class. ... (mv.impact.acquire.dll) - Sometimes when an editor in the property grid was ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue appears to partially have something to do with the order in which the
ResizeGripSize
,ResizeBarSize
, andResizeBorderSize
are being initialized inPropertyGridView.DropDownHolder
.If I change the order from this:
To this:
The drop down resize bar is now displayed and can resize the drop down, but the resize bar is missing the resize grip.
I’ll try to figure out why the resize bar is missing the resize grip, any insight would be appreciated.
@ds1709
https://docs.microsoft.com/en-us/dotnet/core/compatibility/winforms#net-core-30