Applying TextBoxMask on TextBox control is working. However, when the binding value changes, the TextBox UI did not reflect the changes.
Steps to reproduce the behavior (I'm using PRISM 6.x):
<TextBox
Width="120"
Padding="0,4,0,0"
VerticalAlignment="Center"
extensions:TextBoxMask.CustomMask="5:[0-5]"
extensions:TextBoxMask.Mask="99:59:59"
extensions:TextBoxMask.PlaceHolder="--:--:--"
Header="Opening Time"
Text="{x:Bind ViewModel.OpeningTime, Mode=TwoWay}"
TextAlignment="Center" />
<TextBox
Width="120"
Padding="0,4,0,0"
VerticalAlignment="Center"
extensions:TextBoxMask.CustomMask="5:[0-5]"
extensions:TextBoxMask.Mask="99:59:59"
extensions:TextBoxMask.PlaceHolder="--:--:--"
Header="Closing Time"
Text="{x:Bind ViewModel.ClosingTime, Mode=TwoWay}"
TextAlignment="Center" />
```C#
private string _openingTime = "00:00:00";
private string _closingTime = "23:59:59";
private ICommand _resetToDefaultCommand;
public string OpeningTime
{
get { return _openingTime; }
set { SetProperty(ref _openingTime, value); }
}
public string ClosingTime
{
get { return _closingTime; }
set { SetProperty(ref _closingTime, value); }
}
public ICommand ResetToDefaultCommand => _resetToDefaultCommand ??
(_resetToDefaultCommand = new DelegateCommand(() =>
{
OpeningTime = "00:00:00";
ClosingTime = "23:59:59";
}));
``
When Reset Button clicked, theTextBox` did not update the UI. However, if we delete one digit at the back or delete any digit, the value updated.
When ResetToDefault Button clicked:
OpeningTime should be showing: 00:00:00
ClosingTime should be showing: 23:59:59

As we can see here, if the value entered following the mask correctly, and then we update the value via binding, the TextBox did not properly reflect the changes. However, if one of the digit is missing, the value is updated perfectly.
NuGet Package(s):
Package Version(s):
Windows 10 Build Number:
App min and target version:
Device form factor:
Visual Studio
Add any other context about the problem here.
Hello rizamarhaban, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 馃檶
@rizamarhaban Thanks for highlighting the bug. Is this something you can work on, create a PR ?
Okay, will check the code first.
@Kyaa-dost I found the code. It seems the correct TextBox.Text was overridden by the oldtext. The binding works normally but was overridden. Will try to fix this and create PR later.

@Kyaa-dost I have fixed the code however I cannot push my branch or create the PR. Need help on this.
@rizamarhaban sounds like you just cloned the main repo. If you create a fork in GitHub:

You should be able to change your remote to your new fork, then you can push your feature branch to your fork, and then submit a PR to our main repo here with the fix!
Let us know if you need more help submitting the PR! Thanks!
@michael-hawker I'm getting this failed test when running the unit tests. Is this something that I should leave it? it seems has no relation with my simple changes. Other tests passed.

@rizamarhaban looks like the tests passed in the CI, but adding @Sergio0694 here for help with understanding why they might fail locally.
Mmmh those crashes are very weird, also I'm pretty sure those FileNotFound are due to some referenced package not being loaded correctly. @michael-hawker have some NuGet packages been updated in the 7.0 branch? I see the CI is running all tests just fine in master 馃
@Sergio0694 @michael-hawker maybe this detail will help to resolve this,

My laptop has 32GB memory,

@rizamarhaban thanks, we've found the issue and it will be resolved by #3365. So, don't worry about those tests failing locally, you should be all good, thanks!
I also was able to repro similar issues with just XAML directly here in the sample app:
<TextBox Grid.Row="3"
x:Name="TestText"
Text="10:20:30"
Header="Source"
Style="{StaticResource MaskedTextBoxStyle}"/>
<TextBox Grid.Row="4"
extensions:TextBoxMask.CustomMask="5:[0-5]"
extensions:TextBoxMask.Mask="99:59:59"
Header="Target"
Text="{Binding Text, ElementName=TestText, Mode=TwoWay}"
Style="{StaticResource MaskedTextBoxStyle}" />
Taking a look at your PR suggested fix now, thanks!
@michael-hawker Actually the second issue, the OutOfMemoryException from that HighPerformance test, has already been solved (that was in #3350), so if that has been merged into this PR I think it should already be fixed in here as well 馃憤
Most helpful comment
@michael-hawker Actually the second issue, the
OutOfMemoryExceptionfrom thatHighPerformancetest, has already been solved (that was in #3350), so if that has been merged into this PR I think it should already be fixed in here as well 馃憤