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

Proposal: richer image support for [Bitmap]icons #3323

Closed
bschoepke opened this issue Sep 24, 2020 · 3 comments · Fixed by #3629
Closed

Proposal: richer image support for [Bitmap]icons #3323

bschoepke opened this issue Sep 24, 2020 · 3 comments · Fixed by #3629
Assignees
Labels
area-Icon area-Images Images, SVG feature proposal New feature proposal team-Controls Issue for the Controls team

Comments

@bschoepke
Copy link

bschoepke commented Sep 24, 2020

Proposal: Richer image support for [Bitmap]Icons

Summary

Add the ability to use any XAML ImageSource as an icon for MenuFlyoutItem. The BitmapIcon control currently only supports URI image sources; we need it to support stream image sources in order to render things like app icons.

Rationale

  • Enable the shell to render app icons and favicons in context menus. These are backed by Windows.Graphics.Imaging.SoftwareBitmap objects rather than URI's and work fine with the Image control and ImageBrush.
  • Achieve long-term visual consistency by avoiding re-templating MenuFlyoutItem to render these icons.

Scope

Capability Priority
This proposal will allow developers to render any bitmap supported by Windows.UI.Xaml.Media.ImageSource inside a MenuFlyoutItem Must

Important Notes

Usage examples: File Explorer context menus and taskbar jump lists

Open Questions

n/a

@bschoepke bschoepke added the feature proposal New feature proposal label Sep 24, 2020
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Sep 24, 2020
@Felix-Dev
Copy link
Contributor

Felix-Dev commented Sep 24, 2020

@StephenLPeters Should we bundle issues asking for broader image support for Icon properties in a larger work item? With the idea being that we look at this platform-wide?

So far, we have seen asks for broader image support for the NavigationViewItem (here and here) and the MenuFlyoutItem (this issue). Then we also have the AppBarButton.Icon property and the TabViewItem.IconSource property in the framework, for example, for which we should also enable richer image support then if we do it for MenuFlyout and NavigationView items.

Thoughts so far range from expanding the IconSource and IconElement classes (and/or their respective subclasses) to cover more image scenarios to changing the type of the Icon poperty to object and adding an additional IconTemplate API.

This sounds too me like we should consider group all these asks together and think about whether a solution applicable to all of WinUI's Icon properties exist and if so, apply it across the board.

@StephenLPeters
Copy link
Contributor

I agree, these all seem related and I think we should be thinking about the problem holistically. A Meta feature proposal is probably warranted. Additionally we'll want to keep in mind that we have an Animated Icon spec #2802 which is also in the same/similar space.

@StephenLPeters StephenLPeters added area-Images Images, SVG team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Sep 24, 2020
@StephenLPeters StephenLPeters changed the title Proposal: richer image support for MenuFlyoutItem icons Proposal: richer image support for [Bitmap]icons Sep 24, 2020
@ghost ghost added the working on it label Nov 18, 2020
@mdtauk
Copy link
Contributor

mdtauk commented Nov 24, 2020

Is this only for strictly image types, so JPG, PNG, SVG, GIF?

What about ICO format icons? If these are supported, how do you choose the ICO size/format?

@ghost ghost removed the working on it label Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Icon area-Images Images, SVG feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants