Closed AlleSchonWeg closed 1 year ago
Platform (please complete the following information):
Describe the bug I'm trying to add an ios-effect to collection view:
<sh:CollectionView ...> <sh:CollectionView.Effects> <effect:AlwaysBounceEffect /> </sh:CollectionView.Effects> </sh:CollectionView>
but in the effect the Container.Control property is null:
protected override void OnAttached() { var ctrl = this.Control != null ? this.Control : this.Container; //Container contains the Renderer if(ctrl == null) { return; } if(ctrl is CollectionViewRenderer cViewRenderer) { //ctrl.Container.Control is null! //Workaround is using reflection to get the UICollectionView var field = typeof(CollectionViewRenderer).GetField("_collectionView", BindingFlags.NonPublic | BindingFlags.Instance); if(field == null) { return; } ((UICollectionView)field).AlwaysBounceVertical = true; } }
It shoulld be easy to access the native control. UICollectionView in this case.
To Reproduce Steps to reproduce the behavior:
Exceptions (if applicable) Copy paste the exception and the stack trace
Unhandled Exception: System.InvalidOperationException: exception message at Namespace.Call at ....
Screenshots (if applicable) If applicable, add screenshots to help explain your problem.
should be fixed in next version
Platform (please complete the following information):
Describe the bug I'm trying to add an ios-effect to collection view:
but in the effect the Container.Control property is null:
It shoulld be easy to access the native control. UICollectionView in this case.
To Reproduce Steps to reproduce the behavior:
Exceptions (if applicable) Copy paste the exception and the stack trace
Screenshots (if applicable) If applicable, add screenshots to help explain your problem.