Description
openedon Mar 1, 2021
I noticed that expander has two events: Expanding
and Collapsed
that are named differently.
microsoft-ui-xaml/dev/Expander/Expander.idl
Lines 30 to 31 in 4208a01
Expanding
implies the event is fired before the control is expanded and Collapsed
implies after. Therefore, a difference in naming here concerned me so I went to check the code. Sure enough, there seems to be a mismatch. According to the code below all events are fired BEFORE the is expanded state is applied meaning both events should be named with a 'ing' suffix. Is my understanding correct here? If so this is actually a bug.
microsoft-ui-xaml/dev/Expander/Expander.cpp
Lines 104 to 115 in 4208a01
The differences in naming is actually quite important as in the future four events should be added to cancel expanding/collapsing. #3279 (comment). There should be four total events in the end:
- Expanding <- Can cancel
- Expanded
- Collapsing <- Can cancel
- Collapsed