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

System.Drawing.SystemIcons.Shield icon is incorrect in Windows 7 and above #8753

Closed
aquinn39 opened this issue Mar 6, 2023 · 8 comments
Closed
Assignees

Comments

@aquinn39
Copy link

aquinn39 commented Mar 6, 2023

.NET version

7.0

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Not sure. Also unsure if it worked in .Net Framework or not.

Issue description

According to https://learn.microsoft.com/en-us/dotnet/api/system.drawing.systemicons.shield, the shield icon should be used on any control whose default action requires elevation to administrator privileges. Looking at https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-uac, the shield icon used to indicate elevation is required is a blue and yellow shield whereas SystemIcons.Shield, despite being recommended for controls whose default action requires elevation, uses a red, green, blue and yellow shield icon as you can see in the image below:
image.
If we look at some UIs in Windows 11, it uses a blue and yellow shield as expected:
image

It seems that the icon used in System.Drawing.SystemIcons.Shield is actually the older icon from Windows Vista:
image
Whereas it seems to have been changed in to the blue and yellow in Windows 7 and above, but the one in System.Drawing.SystemIcons.Shield was never updated:
image

Steps to reproduce

Show System.Drawing.SystemIcons.Shield anywhere in a UI.

@aquinn39 aquinn39 added the untriaged The team needs to look at this issue in the next triage label Mar 6, 2023
@aquinn39 aquinn39 changed the title System.Drawing.SystemIcons.Shield icon is incorrect System.Drawing.SystemIcons.Shield icon is incorrect in Windows 7 and above Mar 6, 2023
@RussKie
Copy link
Member

RussKie commented Mar 8, 2023

This is not a Windows Forms issue, these icons are defined in dotnet/runtime -> https://github.com/dotnet/runtime/blob/main/src/libraries/System.Drawing.Common/src/System/Drawing/SystemIcons.cs

@aquinn39
Copy link
Author

aquinn39 commented Mar 9, 2023

This is not a Windows Forms issue, these icons are defined in dotnet/runtime -> https://github.com/dotnet/runtime/blob/main/src/libraries/System.Drawing.Common/src/System/Drawing/SystemIcons.cs

Ok so should I move this to the https://github.com/microsoft/dotnet repo then?

@elachlan
Copy link
Contributor

elachlan commented Mar 9, 2023

@RussKie

This comment was marked as resolved.

@merriemcgaw
Copy link
Member

@RussKie we will take care of this on end - System.Drawing is moving into this repo and we'll be handling all of the issues moving forward. This is likely a duplicate of an earlier issue in the current System.Drawing home.

@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Mar 9, 2023
@dreddy-work
Copy link
Member

dotnet/runtime#8633

@merriemcgaw
Copy link
Member

@JeremyKuhne believes there's an active issue on this, and will look it up.

@JeremyKuhne
Copy link
Member

Here is the existing issue: #8842. I've created an official API proposal to deal with this.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants