[PR #8086] Introduce a way to bind an Enum setting for the Settings UI #27090

Open
opened 2026-01-31 09:19:56 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8086

State: closed
Merged: Yes


This PR's goal was to expose the String to Enum mappings we have in JsonUtils and to bind a group of Radio buttons to that setting and its possible enum values. To allow the Radio button groups to be data bound to, I created an EnumEntry class in TSE that'll take a string to represent your enum value name and an IInspectable to associate that name with an enum value. There's also macros that will initialize the necessary properties for a setting whose type is an enum. With these macros, you'll be able to bind to a collection of enum values and to the enum setting itself.

References #1564

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8086 **State:** closed **Merged:** Yes --- This PR's goal was to expose the String to Enum mappings we have in JsonUtils and to bind a group of Radio buttons to that setting and its possible enum values. To allow the Radio button groups to be data bound to, I created an EnumEntry class in TSE that'll take a string to represent your enum value name and an IInspectable to associate that name with an enum value. There's also macros that will initialize the necessary properties for a setting whose type is an enum. With these macros, you'll be able to bind to a collection of enum values and to the enum setting itself. References #1564
claunia added the pull-request label 2026-01-31 09:19:56 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27090