You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
SKCanvas objects render incorrectly in the last couple of cells of a larger CollectionView
The images are LaTex equations created via the CSharpMath Latex library, which utilises SkiaSharp to turn LaTex equation string into an SKCanvasView object.
So SKCanvasView is what the CollectionView is having problems with, I believe.
If I use a ListView instead, the issue does not occur.
Steps to Reproduce
Bind CollectionView to large list of items where one of the bindings is to an SKCanvasView (or more specifically a MathView from the CSharpMath.Forms library)
View page containing the list of items
Scroll to end of list
Expected Behavior
Items rendered correctly
Actual Behavior
Last item(s) of list show repeat of first item(s)
Information
Version with issue: 4.6.0.847 (latest)
Last known good version: Unknown
IDE: VS2019
Platform Target Frameworks: Net Standard 2.0
Android: 9.0
Nuget Packages: CSharpMath.Forms 0.4.2
Screenshots
Reproduction Link
The following branch can be built to see the issue in action
Second, I strongly suspect you're hitting the same problem that is described here: #9200 (comment)
ListView is not as good as CollectionView is at virtualization. That's good because your app will be much more responsive. The tradeoff is that you need to be explicit about the bindings for complex templates.
Description
SKCanvas objects render incorrectly in the last couple of cells of a larger
CollectionView
The images are LaTex equations created via the CSharpMath Latex library, which utilises SkiaSharp to turn LaTex equation string into an
SKCanvasView
object.So
SKCanvasView
is what the CollectionView is having problems with, I believe.If I use a
ListView
instead, the issue does not occur.Steps to Reproduce
CollectionView
to large list of items where one of the bindings is to anSKCanvasView
(or more specifically aMathView
from theCSharpMath.Forms
library)Expected Behavior
Items rendered correctly
Actual Behavior
Last item(s) of list show repeat of first item(s)
Information
Screenshots
Reproduction Link
The following branch can be built to see the issue in action
https://github.com/Stuart88/pure-physicist/tree/wip/collection-view-problem
To locate the issue in the app (Android), navigate to:
Menu -> Topics -> Classical Mechanics -> Equations
Relevant files:
XAML page containing the
CollectionView
https://github.com/Stuart88/pure-physicist/blob/wip/collection-view-problem/PurePhysicist/PurePhysicist/Views/Topics/EquationsViewBase.xaml
Code-behind
https://github.com/Stuart88/pure-physicist/blob/wip/collection-view-problem/PurePhysicist/PurePhysicist/Views/Topics/EquationsViewBase.xaml.cs
Workaround
Currently using ListView instead
The text was updated successfully, but these errors were encountered: