winforms
winforms copied to clipboard
BinaryEditor doesn't work for PropertyGrid control in .net 6 preview.
.NET version
Version: 6.0.400-preview.22301.10 Commit: 25580ffe7a
Host (useful for support): Version: 6.0.6 Commit: 7cca709db2
.NET SDKs installed: 6.0.301 [C:\Program Files\dotnet\sdk] 6.0.400-preview.22301.10 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 3.1.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
not sure
Issue description
After an object is selected for PropertyGrid control to display and if user attempts to click and edit any of its Byte[] property, error message shown like below and supposed BinaryEditor not brought up:
Could not find the resource 'System.ComponentModel.Design.BinaryEditorresources" among the resources "System.Windows.Forms.Design.BorderSidesEditorresources" System.ComponentMode.Design.CollectionEditor.resources" System.Windows.Forms.Design.FormatControl.resources" System.Windows.Forms.Desiqn.LinkAreaEditorresources", System.Wingows.Forms.Desian.MaskDesignerDia og.resources" System.Wingows.Forms.Desian.ShortcutKevsEditorresources". System.SR.resources" System.Wingows.Forms.DesignStringCo ectionEditorresources". System.Windows.Forms.Design.Resources.System.ComponentMode.De sign.BinaryEditor.resources" 'System.Windows.Forms.Design.colordlg.data"... embedded in the assembly "System.Windows.Forms.Design nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with anincorrect name
Steps to reproduce
- Add a PropertyGrid control to ur WinForm.
- Set the PropertyGrid.SelectedObject to an object with Byte[] type properties.
- Run the Form, and click on the Byte[] type property in the PropertyGrid, u see the error message.
Cause and workaround discussed here, waiting for future fix: https://stackoverflow.com/questions/72770925/binaryeditor-class-doesnt-work-for-propertygrid-control-in-net-6-preview?noredirect=1#comment128547943_72770925
Note: This is a runtime not a WinForms Designer issue. We also need to check, if this repros in the Out-Of-Proc Designer, but I would guess in the Designer it works just fine.
@Olina-Zhang: Can you check that? Thanks! @merriemcgaw FYI.
Yep, it's totally a runtime issue. We could actually take your name off of it and bring it back up to the team in triage. I just want to make sure it's on our radar 😃
@Olina-Zhang: Can you check that? Thanks!
Out-Of-Proc Designer works fine, we can change the Byte[] type property successfully.
Can we also check a runtime-only version of the repro? That is what this particular issue is worried about - we are still using the Framework for the UI of the PropertyBrowser in VS, but have .NET for the runtime copy of the editors.
Verified this issue on .NET 8.0.100 RC.2.23423.1 using attached project(BinaryEditor.zip), it was fixed. No error message shows while clicking byte[] type property in PropertyGrid.
Verified this issue in Winforms main branch for .Net 9.0, it has same result as above Eudora's. Byte Array Property Editor can be displayed: