how to remove or hide indicator carouselview MAUI app

Nam Pham 96 Reputation points

Screenshot 2023-03-15 155529

how can i remove or hide this?

it appears when i swipe carousel.

it happens on iOS

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,841 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 25,996 Reputation points Microsoft Vendor


    The CarouselView is rendered by UICollectionView in iOS platform, and UICollectionView is derived from UIScrollView. You can set showsHorizontalScrollIndicator and showsVerticalScrollIndicator false to hide the indicator.
    With MAUI, you could custom control with handlers and overwrite the ScrollToRequested method, please refer to .NET MAUI control customization with handlers - .NET MAUI | Microsoft Learn and the following code:


    namespace CarouselViewDemos.Handler
        public partial class CustomCarouseHandler: Microsoft.Maui.Controls.Handlers.Items.CarouselViewHandler


    namespace CarouselViewDemos.Handler
        public partial class CustomCarouseHandler
            protected override void ScrollToRequested(object sender, ScrollToRequestEventArgs args)
                Controller.CollectionView.ShowsHorizontalScrollIndicator = false;
                Controller.CollectionView.ShowsVerticalScrollIndicator = false;
                base.ScrollToRequested(sender, args);

    Register the handler using the ConfigureMauiHandlers and AddHandler methods in your app's MauiProgram class.

    .ConfigureMauiHandlers(handlers =>
                            handlers.AddHandler(typeof(CarouselView), typeof(CustomCarouseHandler));

    Best Regards,

    Wenyan Zhang

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful