Skip to content

Exception is thrown when writing more characters than the available in TextBox #19591

Open
@ADD-Noureddine-Maachi

Description

@ADD-Noureddine-Maachi

Current behavior

In Skia WPF, when writing more characters than the specified in the MaxLength property from the TextBox throws an exception of type ArgumentOutOfRangeException.

Expected behavior

Exception should not be thrown when trying to write more characters than the allowed in the TextBox.

How to reproduce it (as minimally and precisely as possible)

  1. Open the attached solution and compile it.
  2. Execute it Desktop head.
  3. Check 'Common Language Runtime Exceptions' inside 'Exception Settings' to be able to see the exception.
  4. Write more than 10 characters in the TextBox.

Workaround

No known workaround.

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

NuGet package(s): Uno.WinUI
NuGet package version(s): Uno.WinUI 5.5.94

Affected platforms

Skia (WPF)

IDE

Visual Studio 2022

IDE version

17.13.0

Relevant plugins

No response

Anything else we need to know?

TextBoxMaxLength.zip

Metadata

Metadata

Assignees

Labels

difficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.kind/bugSomething isn't workingtriage/untriagedIndicates an issue requires triaging or verification

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions