Skip to content

SelectionLength Property Not Applied to Entry at Runtime #26158

@NirmalKumarYuvaraj

Description

@NirmalKumarYuvaraj

Description

The SelectionLength property in the Entry control is not being applied at runtime as expected. When attempting to set the SelectionLength dynamically, the changes do not reflect in the Entry control's text selection.

code snippet:

entry.Focused += (sender, e) =>
            {
                entry.SelectionLength = 3;
                Debug.WriteLine("entry.Focused");
            };
<Entry x:Name="entry" Text="Microsoft Maui Entry"></Entry>

Steps to Reproduce

  1. Create a new .NET MAUI App.
  2. Add an Entry control to the XAML.
  3. Wire the focused event of the Entry and set the SelectionLength property at runtime when the Entry receives focus.

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Android, iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

area-controls-entryEntryp/1Work that is important, and has been scheduled for release in this or an upcoming sprintplatform/androidplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions