CommunityToolkit / CommunityToolkit/Windows

IsEqualStateTrigger with Enum throwing FormatException at runtime

Abierto
#46 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug components::triggers
Lenguaje dominante
C#
Estrellas
1.1k
Forks
166
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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:
![image](https://github.com/CommunityToolkit/Labs-Windows/assets/13891066/94418914-c6d5-4ab0-9695-c818492c7b58)
![image](https://github.com/CommunityToolkit/Labs-Windows/assets/13891066/a7ed248b-6354-41f4-81c4-a22e77ce254f)

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza con IsEqualStateTrigger y reproduce el escenario de SettingsCard ContentAlignment cambiando el valor de XAML en tiempo de ejecución con Windows App SDK 1.3. Rastrea la conversión del enum que produce la FormatException y comprueba si otros state triggers también la comparten. Se considera terminado cuando editar en vivo un valor de enum ya no registra la excepción y el trigger responde correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.