Command should expose IconPath, not IconSource #10837

Open
opened 2026-01-31 02:31:37 +00:00 by claunia · 0 comments
Owner

Originally created by @carlos-zamora on GitHub (Sep 30, 2020).

Originally assigned to: @carlos-zamora on GitHub.

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.
Originally created by @carlos-zamora on GitHub (Sep 30, 2020). Originally assigned to: @carlos-zamora on GitHub. 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: ```xml <local:HasNestedCommandsVisibilityConverter x:Key="HasNestedCommandsVisibilityConverter"/> ``` or ```xml 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10837