A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Thanks for reaching out
In a CollectionView, each Entry is inside a DataTemplate and is created/recycled by virtualization. That makes it hard to directly reference and call Focus() on “the newly added row’s Entry”.
A common workaround is: drive focus from the ViewModel via a bindable property, and let the custom Entry focus itself when that property becomes true. This pattern is shown as a workaround for “focus next Entry in CollectionView” scenarios.
- Create a custom Entry that focuses itself when a bindable flag becomes true Create something like
MyEntryyou can apply the same idea to your existingBorderlessEntrycontrol - Add a “ShouldFocus” property to each row or item in your list. public class ShoppingRow : ObservableObject // or INotifyPropertyChanged { private string _text; public string Text { get => _text; set => SetProperty(ref _text, value); } private bool _shouldFocus; public bool ShouldFocus { get => _shouldFocus; set => SetProperty(ref _shouldFocus, value); } } In MAUI, pressing Enter/Return triggers the Entry completion flow (commonly handled via Completed / Return command patterns). This is also the reason the CommunityToolkit provides a focus-on-complete behavior.
- When you press Enter/Return, add a new row and focus it code-behind
Entry_Completed, or MVVM command (preferred) void Entry_Completed(object sender, EventArgs e) { if (BindingContext is YourViewModel vm) vm.AddRowAndFocus(); } Your repo already has a customBorderlessEntrycontrol folder. So you can implement the sameIsExpectedToFocusbindable property inside yourBorderlessEntryinstead of creatingFocusableEntryseparately. That keeps your styling intact while enabling reliable focusing.
"Please try the steps shared above and let me know if this resolves the issue.
If it works, you may mark this reply as the Accepted Answer — this helps other customers with similar questions find the solution faster."