TextBoxMask.Mask issue after changing selected tab from TabView
Describe the bug
For some reason changing the TabView selected tab makes the TextBoxMask.Mask go crazy
Steps to Reproduce
Steps to reproduce the behavior:
- Run the project from https://1drv.ms/u/s!AgD0z8JsfL_7gsdaPPyFPuaTvXtXtQ?e=aTjP5a
- Put a valid date and time within dtpStartTime control
- Select Tab2
- Select Tab1
- Select all text within the dtpStartTime control and press the "Backspace" key
- Put a valid date and time within dtpStartTime control
- At this point the mask won't work anymore, it won't let the cursor to move forward while typing the date
- Select Tab2
- Select Tab1
- Select all text within the dtpStartTime control and press the "Backspace" key
- Put a valid date and time within dtpStartTime control
- At this point the control will display repeated numbers instead of the correct date
Expected behavior
The TextBoxMask.Mask extension should work as expected after changing the selected Tab and then going back to Tab1
Video
https://1drv.ms/v/s!AgD0z8JsfL_7gsdZmbKDL7TbZbOw1w?e=RY7kjQ Every time I entered the value "12312019 0000"
Environment
NuGet Package(s): Microsoft.Toolkit.Uwp.UI 5.1.1 Microsoft.Toolkit.Uwp.UI.Controls 5.1.1
Package Version(s):
Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [X] May 2019 Update (18362)
- [ ] Insider Build (build number: )
App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [X] May 2019 Update (18362)
- [ ] Insider Build (xxxxx)
Device form factor:
- [X] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT
Visual Studio
- [ ] 2017 (version: )
- [X] 2019 (version: 16.2.3)
- [ ] 2019 Preview (version: )
@c4rlosmarin can you check if this behavior is the same in the new TabView for WinUI 2.2 that just released? If it's the same there it's either a bug in the TextBoxMask extension or the platform, but it'd help us narrow it down to be outside of our TabView. Thanks!
Hi @michael-hawker, is there some documentation about how to add a TabView for WinUI 2.2 through the XAML designer? So far I haven't been able to add a TabViewItem element to it:

By the way, I was able to workaround this by implementing the tabs through a Pivot control. So I guess it's indeed a TabView control issue.
Cheers, CM
@c4rlosmarin there was an issue before with needing to specify the tabs in a TabItems collection, that's been resolved. You can find documentation about TabView here.
We're going to be deprecating our TabView now that the WinUI one supports the majority of our scenarios, so I'm going to close this issue. If you still notice a problem with their TabView, please open an issue on their repo here, thanks!