[WinForms] Improve compatibility of property grid custom editors (#21661)
commit771947925a512a91e1ac88eb463ec845cafc2807
authorglopesdev <glopesdev@users.noreply.github.com>
Thu, 1 Jun 2023 14:17:29 +0000 (1 15:17 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Jun 2023 14:17:29 +0000 (1 16:17 +0200)
tree942b48264eb2636f12ddd60293679ac0a6ba67ac
parentf0edcfd076d93657b10c30a1b4e48afa9866728a
[WinForms] Improve compatibility of property grid custom editors (#21661)

This PR allows the `IServiceProvider` implementation for property grid items to resolve `GetService` requests using the control `Site`, if specified. This is consistent with the original behavior on .NET Framework and is fundamental to enable advanced extensibility scenarios where custom editors require services from the application hosting the property grid.

Fixes #21660
mcs/class/System.Windows.Forms/System.Windows.Forms/GridEntry.cs