【发布时间】:2020-03-26 15:10:58
【问题描述】:
我只是想问一下轮播页面的流向。我知道 Carousel View 可以选择流向,但我似乎无法找到 carousel 页面具有相同的选项。 所以我试图想出一些可以解决我的问题的东西。 我有一个带有 2 个按钮的主页,其中一个将我带到 Carousel 1,向右滑动我得到 carousel 2,另一个到 carousel 2,向右滑动到 carousel 1。但是我被要求更改流程所以如果我去旋转木马 2,我向左滑动以获得旋转木马 1。
I have tried switch case but for some reason the first page doesnt load properly
// System.Threading.Thread.Sleep(500);
// //model.Busy = false;
// Device.BeginInvokeOnMainThread(async () =>
// {
// switch (_pages)
// {
// case Pages.Reading:
// await Navigation.PushAsync(new CarouselLearning(false), false);
// break;
// case Pages.Listening:
// await Navigation.PushAsync(new CarouselLearning(true), false);
// break;
// }
// Navigation.RemovePage(this);
// });
//});
and then i tried just simple navigation which of course dosent work
private async void OnListeningButtonClicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new CarouselLearning(Listening));
}
你有这方面的经验吗?
【问题讨论】:
-
CarouselPage 已被弃用,取而代之的是 CaouselView,如果 CarouselView 具有您需要的功能,为什么不使用它呢?
标签: xamarin.forms