Skip to content

Binding fails for TextBox with a Mask bound to the Text of another TextBox using Binding. #3514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
Rosuavio opened this issue Oct 1, 2020 · 2 comments
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior extensions ⚡
Milestone

Comments

@Rosuavio
Copy link
Contributor

Rosuavio commented Oct 1, 2020

Describe the bug

When a TextBox with a Mask is bound to the Text from another TextBox using Binding It does not load showing the target value.

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

Steps to reproduce the behavior:

  1. Use Binding to bind the Text from a TextBox with a TextBoxMask.Mask to a TextBox's Text.
  2. Load a page or controls that has the two controls.
  3. See that the Text on the binding target did not update from source.

Expected behavior

The TextBox with the Mask loads with the Text from the source if it fits the mask.

Screenshots

image

Environment

NuGet Package(s): 
Microsoft.Toolkit.Uwp.UI 6.1.1
Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] May 2020 Update (19041)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [x] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [x] 2019 (version: 16.7.5) 
- [ ] 2019 Preview (version: )

Additional context

Sample Code. Derived from #3335 (comment)

<Page
    x:Class="Periscoe.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Periscoe"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
        <TextBox
                x:Name="tbxSource"
                Text="10:20:30"
                Header="Source"
                />
        <AppBarSeparator VerticalAlignment="Center"/>
        <TextBox
                x:Name="tbxTarget"
                extensions:TextBoxMask.Mask="99:59:59"
                Header="Target"
                Text="{Binding Text, ElementName=tbxSource}"
                />
    </StackPanel>
</Page>
@Rosuavio Rosuavio added the bug 🐛 An unexpected issue that highlights incorrect behavior label Oct 1, 2020
@ghost ghost added the needs triage 🔍 label Oct 1, 2020
@ghost
Copy link

ghost commented Oct 1, 2020

Hello RosarioPulella, 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 🙌

@Rosuavio Rosuavio changed the title Binding fails for TextBox with a Mask bound to the Text of another TextBox using Binding. Binding fails for TextBox with a Mask bound to the Text of another TextBox using Binding. Oct 1, 2020
@Kyaa-dost Kyaa-dost added this to the 7.0 milestone Oct 1, 2020
@Rosuavio
Copy link
Contributor Author

Rosuavio commented Dec 8, 2020

We should check if this is still an issue. Also adding a test for this once #3580 is merged should help.

@Kyaa-dost Kyaa-dost modified the milestones: 7.0, 7.1 Feb 18, 2021
@michael-hawker michael-hawker modified the milestones: 7.1, 7.2/8.0? Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior extensions ⚡
Projects
None yet
Development

No branches or pull requests

3 participants