CommunityToolkit / CommunityToolkit/Windows
IsEqualStateTrigger with Enum throwing FormatException at runtime
- Langage dominant
- C#
- Étoiles
- 1.1k
- Forks
- 166
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Bringing this issue from [here](https://github.com/CommunityToolkit/Labs-Windows/issues/216#issuecomment-1542604878)
I've discovered this while using `SettingsCard` and changing it's `ContentAlignment` property at runtime by editing XAML.
The `SettingsCard` uses the trigger like this:
```xaml
```
When I set that property before running the app, it works as it should.
But when I live edit it, it doesn't work and logs `FormatException`.
I found it fails here:


Two more notes:
- I didn't try binding it somewhere
- I'd say this might be occurring in other triggers too, didn't test
I'm running WindowsAppsSDK 1.3
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par IsEqualStateTrigger et reproduisez le scénario SettingsCard ContentAlignment en modifiant la valeur XAML à l’exécution avec Windows App SDK 1.3. Suivez la conversion de l’énumération qui produit la FormatException et vérifiez si d’autres state triggers sont également concernés. Le travail est terminé lorsqu’une modification en direct d’une valeur d’énumération n’enregistre plus l’exception et que le trigger réagit correctement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100