Skip to content
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

SelectionLength Property Not Applied to Entry at Runtime #26158

Open
NirmalKumarYuvaraj opened this issue Nov 27, 2024 · 2 comments · May be fixed by #26213
Open

SelectionLength Property Not Applied to Entry at Runtime #26158

NirmalKumarYuvaraj opened this issue Nov 27, 2024 · 2 comments · May be fixed by #26213
Labels
s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@NirmalKumarYuvaraj
Copy link
Contributor

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

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

@NirmalKumarYuvaraj NirmalKumarYuvaraj added the t/bug Something isn't working label Nov 27, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Nov 28, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.13 Preview 1 (9.0.10 & 9.0.0 & 8.0.100 & 8.0.3). Can repro this issue on Android platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants