[Windows] Fixed TextCell Command executes only once
Root Cause
While fixing a memory leak in ListView, the Cell's parent was set to null in the Unloaded event. This caused the TextCell's parent to be set to null during initial navigation, preventing commands from executing afterward.
Description of Change
The fix ensures that the parent is set to null only when the parent control is a ListView. This preserves the memory leak fix while also resolving the issue with command execution in TextCell.
Tested the behaviour in the following platforms
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac
Issues Fixed
Fixes https://github.com/dotnet/maui/issues/21112
Screenshots
| Before Issue Fix | After Issue Fix |
|---|---|
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).