AndreiMisiukevich / CardView

CardsView | CarouselView | CoverflowView | CubeView for Xamarin.Forms
MIT License
710 stars 114 forks source link

Xamarin Forms - UWP - Item pages do not always render #335

Closed mmurfinsimmons closed 4 years ago

mmurfinsimmons commented 4 years ago

I am trying to to use this to present a swipeable 'tabbed pages' wizard data-entry pages effect. ItemSource is set to an observable collection of custom complex contentview types (no template). On Android and IOS this works correctly. On UWP sometimes items appear 'blank' when navigated to from the tab-header or in code. If I touch+drag even a tiny bit then the blank view is rendered, or if I revisit the page 2nd time is fine.

  <cards:CarouselView x:Name="carousel"
                            HorizontalOptions="FillAndExpand"
                            IsCyclical="False"
                            ItemsSource="{Binding ResultWizardValidPages}"
                            IsUserInteractionEnabled="{Binding IsSwipingEnabled}"
                            IsVerticalSwipeEnabled="False"
                            SelectedIndex="{Binding CurrentPageIndex}"
                            SwipeThresholdDistance="25"
                            VerticalOptions="FillAndExpand" />

The 'pages' are created in code (many variations) (build up observable list).

addPage(checklistPage, STStyles.Res(Constants.STRING_PAGE_BUILDING_CHECKLISTS));
addPage(correctionPage, STStyles.Res(Constants.STRING_PAGE_BUILDING_CORRECTION));
addPage(attachmentPage, STStyles.Res(Constants.STRING_PAGE_ATTACHMENTS));
addPage(commentPage, STStyles.Res(Constants.STRING_PAGE_COMMENTS));
addPage(resultPage, STStyles.Res(Constants.STRING_PAGE_RESULTS));
addPage(summaryPage, STStyles.Res(Constants.STRING_PAGE_SUMMARY));
AndreiMisiukevich commented 4 years ago

Try v. 2.4.5

AndreiMisiukevich commented 4 years ago

Try it and let me know the result)

mmurfinsimmons commented 4 years ago

Thanks - that fixes it perfectly!

AndreiMisiukevich commented 4 years ago

Thanks - that fixes it perfectly!

Please verify that issue doesn't exist on 2.4.6 as well

mmurfinsimmons commented 4 years ago

Andrei - 2.4.6 reverted the code fixes and this defect has reappeared.

AndreiMisiukevich commented 4 years ago

Ah, thanks.

AndreiMisiukevich commented 4 years ago

Don't you mind to try one more version? (I don't have Windows for testing)

AndreiMisiukevich commented 4 years ago

Please try 2.4.7 (if it is not working as well, then I will revert changes and put my initial fix :) )

mmurfinsimmons commented 4 years ago

Andrei, v2.4.7 88f1181 does not fix my original UWP problem.

AndreiMisiukevich commented 4 years ago

2.4.8

mmurfinsimmons commented 4 years ago

Thanks! 2.4.8 is rendering programmatic page switches again!