本文介绍了如何禁用CarouselPage的手势(滑动左/右)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用CarouselPage进行从右到左的过渡动画.您能帮我禁用CarouselPage中的getsures吗?我做不到.

I want to use CarouselPage to have the right-to-left transition animation.Could you please help me disable getsures in CarouselPage? I can't do that.

谢谢.

推荐答案

设置CarouselPage的InputTransparent会执行以下操作:

Setting InputTransparent of the CarouselPage will do the thing:

public App ()
{
    MainPage = new CarouselPage{
        InputTransparent = true, //This!
        Children = {
            new ContentPage{
                Content = new Label{
                    Text = "Page 1",
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                    VerticalOptions = LayoutOptions.CenterAndExpand,
                }
            },
            new ContentPage{
                Content = new Label{
                    Text = "Page 2",
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                    VerticalOptions = LayoutOptions.CenterAndExpand,
                }
            }
        }
    };
}

这篇关于如何禁用CarouselPage的手势(滑动左/右)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-28 18:36