CommunityToolkit / CommunityToolkit/Windows
StartAnimationAction throw exception when Animation is null
- Vorherrschende Sprache
- C#
- Sterne
- 1.1k
- Forks
- 166
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Describe the bug
when `StartAnimationAction`'s `Animation` binding to a element with ElementName which has not been "loaded", if the animation is triggered, it will throw a exception
```
System.ArgumentNullException: Value cannot be null. (Parameter 'Animation')
```
### Steps to reproduce
```text
described as above
```
### Expected behavior
StartAnimationAction should ignore null value rather than throw a exception
### Screenshots
_No response_
### Code Platform
- [ ] UWP
- [X] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
### Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 10 21H2 (Build 19044)
- [ ] Windows 10 22H2 (Build 19045)
- [X] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
### Other Windows Build number
_No response_
### App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [X] Windows 10, version 2004 (Build 19041)
- [ ] Windows 10, version 2104 (Build 20348)
- [ ] Windows 11, version 22H2 (Build 22000)
- [ ] Other (specify)
### Other SDK version
_No response_
### Visual Studio Version
2022
### Visual Studio Build Number
17.7.4
### Device form factor
Desktop
### Additional context
_No response_
### Help us help you
Yes, but only if others can assist.
Beitragsleitfaden
Rechercherichtung
Beginne damit, StartAnimationAction und den Codepfad zu lokalisieren, der in der WinAppSDK/WinUI 3-Implementierung die Animation-Bindung für ein nicht geladenes ElementName auflöst. Stelle den im Issue beschriebenen Auslöser für die Null-Animation nach und überprüfe anschließend, dass die Aktion den Nullwert ignoriert, ohne eine Exception auszulösen, und dass das bestehende Verhalten intakt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- desktop, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100