Skip to content

Commit

Permalink
Remove search bar hide on homepage scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
akv3sic committed Nov 5, 2023
1 parent ff7dc00 commit b50e0fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 2 additions & 5 deletions MauiStoreApp/Views/HomePage.xaml
Expand Up @@ -46,7 +46,7 @@
</Grid.RowDefinitions>

<!-- Fixed -->
<StackLayout x:Name="searchBar" Grid.Row="0">
<StackLayout Grid.Row="0">
<!-- Search Bar Background -->
<Frame
Margin="0"
Expand Down Expand Up @@ -82,10 +82,7 @@
</StackLayout>

<!-- ScrollView -->
<ScrollView
Grid.Row="1"
IsVisible="{Binding IsBusy, Converter={StaticResource InvertedBoolConverter}}"
Scrolled="OnScrolled">
<ScrollView Grid.Row="1" IsVisible="{Binding IsBusy, Converter={StaticResource InvertedBoolConverter}}">
<StackLayout Padding="12,10">
<Label
Margin="0,15,0,10"
Expand Down
5 changes: 0 additions & 5 deletions MauiStoreApp/Views/HomePage.xaml.cs
Expand Up @@ -9,9 +9,4 @@ public HomePage(HomePageViewModel viewModel)
InitializeComponent();
BindingContext = viewModel;
}

private void OnScrolled(object sender, ScrolledEventArgs e)
{
searchBar.IsVisible = e.ScrollY < 90;
}
}

0 comments on commit b50e0fa

Please sign in to comment.