Xamarin Forms:在轮播页面或选项卡页面内滑动超过四个内容页面时的值 vanished/refreshed

Xamarin Forms: Values vanished/refreshed on swiping more than four content pages inside carousel page or tabbed page

我正在开发一个 xamarin 表单项目,该项目有一个轮播页面容器,内容页面的 children 是根据不同的条件检查动态创建的。 (在我的情况下最少 8 children)

让我们以提到的最小情况为例。我在第一个 child 的 entry/picker 控件中输入了一些值,然后 navigate/swipe 页直到第 5 child 页。当我回到第一个 child 页面时,我 entered/selected 的值现在是 vanished/refreshed.

我注意到轮播页面只保存了3页数据。即(左页,当前页和右页)。 而标签页保存4页数据.

我希望这些值保留在我输入的 child 页面中,无论我是导航到最后一页还是在中间并导航回该页面。

我已经通过“旋转木马页面/标签页保存状态”等字母进行了谷歌搜索,但找不到有用的东西。

所以,我需要知道 属性 名称/方法名称 等,xamarin 将轮播页面的限制设置为 3,将选项卡页面的限制设置为 4 .

等待您的回复。

谢谢。

好的,我发现我使用的是自定义选择器控件,值刷新问题与它有关。我只是忘记在 OnElementChanged 事件上设置选择器的 selectedIndex