Skip to content

Commit

Permalink
Update SearchPage.xaml.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
duffh committed Jul 23, 2024
1 parent 53f4425 commit ade0dea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/MAUI/Maui.Samples/Views/SearchPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ public SearchPage()
InitializeComponent();
_viewModel = new SearchViewModel();
BindingContext = _viewModel;
}

// Focus search bar when page loads.
SampleSearchBar.Loaded += SampleSearchBar_Loaded;
}

private void SampleSearchBar_Loaded(object sender, EventArgs e)
{
SampleSearchBar.Focus();
}

private void TapGestureRecognizer_SearchResultTapped(object sender, TappedEventArgs e)
{
Expand Down

0 comments on commit ade0dea

Please sign in to comment.