diff --git a/src/MAUI/Maui.Samples/Views/CategoryPage.xaml.cs b/src/MAUI/Maui.Samples/Views/CategoryPage.xaml.cs index 0760f929a4..0b60248c1c 100644 --- a/src/MAUI/Maui.Samples/Views/CategoryPage.xaml.cs +++ b/src/MAUI/Maui.Samples/Views/CategoryPage.xaml.cs @@ -68,8 +68,10 @@ private async void SearchClicked(object sender, EventArgs e) await Navigation.PushAsync(new SearchPage(), false); } + // The favorites icon can flicker when using a pen as pointer. private void PointerGestureRecognizer_PointerEntered(object sender, PointerEventArgs e) { +#if WINDOWS || MACCATALYST var view = (Border)sender; var grid = (Grid)view.Content; @@ -79,10 +81,12 @@ private void PointerGestureRecognizer_PointerEntered(object sender, PointerEvent imageButton.IsVisible = true; Console.WriteLine("PointerRecognized"); +#endif } private void PointerGestureRecognizer_PointerExited(object sender, PointerEventArgs e) { + #if WINDOWS || MACCATALYST var view = (Border)sender; var grid = (Grid)view.Content; @@ -92,6 +96,7 @@ private void PointerGestureRecognizer_PointerExited(object sender, PointerEventA string sampleName = (string)imageButton.CommandParameter; imageButton.IsVisible = false || SampleManager.Current.IsSampleFavorited(sampleName); +#endif } protected override void OnNavigatedTo(NavigatedToEventArgs args)