You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did it work in any of the earlier releases of .NET Core or .NET 5+?
.net 8
Issue description
The logic for refreshing the property list when using the [RefreshProperties(RefreshProperties.All)] attribute is broken in .net 9
In .net 8 everything works as expected.
When changing a property, now only the values are refreshed, although the documentation clearly states that using RefreshProperties.All will cause properties to be requeried. Now RefreshProperties.All behaves like RefreshProperties.Repaint
Updating the code below from .net 8 to .net 9 causes the GetProperties method to stop being called when changing property A via PropertyGrid
public Form1()
{
InitializeComponent();
propertyGrid1.SelectedObject = new SelectedObject();
}
[TypeConverter(typeof(MyTypeConverter))]
public class SelectedObject
{
private string a;
private string b;
[RefreshProperties(RefreshProperties.All)]
public string A
{
get { return a; }
set { a = value; }
}
public string B
{
get { return b; }
set { b = value; }
}
}
public class MyTypeConverter : TypeConverter
{
public MyTypeConverter()
: base() { }
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
{
return true;
}
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
{
return base.GetProperties(context, value, attributes) ?? TypeDescriptor.GetProperties(value, attributes);
}
}
The text was updated successfully, but these errors were encountered:
sanyappc
changed the title
Changing properties with RefreshProperties.All does not requery the property list of the PropertyGrid in .net 9
Changing properties with RefreshProperties.All does not requery the property list of the PropertyGrid in .net 9 (worked in .net 8)
Mar 4, 2025
sanyappc
changed the title
Changing properties with RefreshProperties.All does not requery the property list of the PropertyGrid in .net 9 (worked in .net 8)
Changing properties with RefreshProperties.All does not requery the property list in the PropertyGrid in .net 9 (worked in .net 8)
Mar 4, 2025
.NET version
.net 9
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
.net 8
Issue description
The logic for refreshing the property list when using the [RefreshProperties(RefreshProperties.All)] attribute is broken in .net 9
In .net 8 everything works as expected.
When changing a property, now only the values are refreshed, although the documentation clearly states that using RefreshProperties.All will cause properties to be requeried. Now RefreshProperties.All behaves like RefreshProperties.Repaint
The bug was added with commit dc4314e
Steps to reproduce
Updating the code below from .net 8 to .net 9 causes the GetProperties method to stop being called when changing property A via PropertyGrid
The text was updated successfully, but these errors were encountered: