Bug: Setting InputScope in XAML Style Fails when Applied to Multiple Controls #3333
Labels
area-Styling
area-TextBox
TextBox, RichEditBox
bug
Something isn't working
team-Controls
Issue for the Controls team
Describe the bug
Attempting to set the same InputScope value in a XAML defined style to multiple controls will fail. For example, the following XAML markup will fail to work as expected for the second TextBox and it will have null assigned for the
InputScope
instead ofNumber
.Originally discussed with @RealTommyKlein @StephenLPeters here: #3186 (comment)
This appears to only be a problem in styles. The style seems to be creating a single instance of the InputScope object and then when it attempts to apply it to multiple controls it fails -- possible because it already has a parent after setting to the first control.
Steps to reproduce the bug
See above XAML
Expected behavior
Multiple InputScope objects should be created -- one for every instance of the control. The InputScope should be set successfully when set in a style and that style is applied to multiple controls.
Version Info
NuGet package version:
Additional context
The text was updated successfully, but these errors were encountered: