Repository metrics
- Stars
- (5,644 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
Description
I have a page that sets focus to an Entry and then pre-selects text. This works fine in a TabbedPage, but within Shell it's losing focus.
Losing focus: https://www.screencast.com/t/Daq7XY40
protected override void OnAppearing()
{
base.OnAppearing();
MakeSelection();
}
private void MakeSelection()
{
FirstEntry.Focus();
FirstEntry.CursorPosition = 4;
FirstEntry.SelectionLength = 11;
}
If I set the ShellContent to be ShellSections (bottom tabs) and yet also displayed in the flyout, this is not a problem. It seems navigation from ShellItem to ShellItem introduces an animation that is causing this issue.
Not losing focus: https://www.screencast.com/t/GBJOIi9a
This is fine:
<Shell ...>
<ShellItem FlyoutDisplayOptions="AsMultipleItems" Title="Releases">
<ShellContent Title="3.1.0" ContentTemplate="{DataTemplate views:ThreeOnePage}" Icon="iconXamagon"/>
<ShellContent Title="3.2.0" ContentTemplate="{DataTemplate views:ThreeTwoPage}" Icon="iconXamagon"/>
<ShellContent Title="3.3.0" ContentTemplate="{DataTemplate views:ThreeThreePage}" Icon="iconXamagon"/>
<ShellContent Title="3.4.0" ContentTemplate="{DataTemplate views:ThreeFourPage}" Icon="iconXamagon"/>
<ShellContent Title="3.5.0-pre" ContentTemplate="{DataTemplate views:ThreeFivePage}" Icon="iconXamagon"/>
</ShellItem>
</Shell>
This is not:
<Shell ...>
<ShellContent Title="3.1.0" ContentTemplate="{DataTemplate views:ThreeOnePage}" Icon="iconXamagon"/>
<ShellContent Title="3.2.0" ContentTemplate="{DataTemplate views:ThreeTwoPage}" Icon="iconXamagon"/>
<ShellContent Title="3.3.0" ContentTemplate="{DataTemplate views:ThreeThreePage}" Icon="iconXamagon"/>
<ShellContent Title="3.4.0" ContentTemplate="{DataTemplate views:ThreeFourPage}" Icon="iconXamagon"/>
<ShellContent Title="3.5.0-pre" ContentTemplate="{DataTemplate views:ThreeFivePage}" Icon="iconXamagon"/>
</Shell>
Steps to Reproduce
- Navigate to the 3.2.0 page from the flyout
Expected Behavior
Focus set in OnAppearing is not lost until the user changes focus..
Actual Behavior
Focus is lost a split second after appearing.
Basic Information
- Version with issue: 4.0-pre1
Screenshots
https://www.screencast.com/t/Daq7XY40
https://www.screencast.com/t/GBJOIi9a
Reproduction Link
Parent: #2415