Skip to content

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

Open
@Rosuavio

Description

@Rosuavio

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviorextensions ⚡

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions