Skip to content

Command should expose IconPath, not IconSource #7784

@carlos-zamora

Description

@carlos-zamora

CommandPalette data binds itself to the IconSource of Command. Command should instead operate more like Profile in that it only exposes the IconPath.

CommandPalette can still be bound to the command's icon by using a converter like this:

            <local:HasNestedCommandsVisibilityConverter x:Key="HasNestedCommandsVisibilityConverter"/>

or

                                    Visibility="{x:Bind HasNestedCommands,
                                                 Mode=OneWay,
                                                 Converter={StaticResource HasNestedCommandsVisibilityConverter}}"

(also see CommandKeyChordVisibilityConverter)

This'll also be very useful for Profile too because...

  1. Profile icons will now be able to be set to non-path images (i.e. SegoeUI icons, emoji, etc.)
  2. Settings UI will need a similar kind of data binding in the very near future.

Metadata

Metadata

Assignees

Labels

Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions