microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
unloaded event is triggered for the control when the control is set as content for the ContentDailog
Describe the bug
The TextBox control is set as content for the contentDailog which is called to show inside the button click. When we call the content dailog through the button click, the unloaded event is called for the TextBox control. It should not called when the text box is display in the view.
Steps to reproduce the bug
- Run the Sample. SfCalendarDatePickerBug.zip
- TextBox in the mainpage will call loaded event properly without calling the unloaded evet. inside the loaded and unloaded event, we have set the text for the text box for better understandable.
- Click the button to display the content dailog with the TextBox as content.
- On that time, the unloaded event triggered, so the text in the content is set as unloaded. Expected Behavior
- It should not trigger the unloaded event.
Expected behavior
It should trigger the loaded event only.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.2.5: 1.2.230313.1
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response