Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to hide keyboard programmatically on CarouselPage page change

$
0
0

I have a carousel page with multiple content pages. Some of those have Entry fields. When the user swipes right or left, I'd like to hide visible keyboard on pages that do not have an Entry. For example, for the first page:

        protected override void OnCurrentPageChanged()
        {
            base.OnCurrentPageChanged();

            if (CurrentPage == Children[0]) 
            {
                // Hide keyboard
            }
        }

Can this be done without a custom renderer or dependency service call? If not, I'm looking for platform specific code for Android and iOS.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>