Closed masiri201 closed 6 years ago
I haven't faced such an issue yet. What are the contents of your tab items? It would be easier if you could share some code.
Hello, My tab Items are just content pages with a label on the middle for now.
The delay its not in the slide, the slide responds well and fast, it's the tab indicator that takes a while to change the tab.
List
I tried by setting different views includeing images and stack layouts, but couln't recreate the problem. What are the contents of your TabItems?
@chaosifier this is what @masiri201 is saying Delay Sliding
If I understood correctly :D
Yes that's exactly what i'm talking about @zaoky thanks for clarifying ;)
I've managed to fix this by adding
SetPosition(positionChangingArgs.NewPosition);
to the carousel view PropertyChanged Event so it looks like this:
`private bool _supressCarouselViewPositionChangedEvent = false; private void _carouselView_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == nameof(_carouselView.Position) && !_supressCarouselViewPositionChangedEvent) { var positionChangingArgs = new PositionChangingEventArgs() { Canceled = false, NewPosition = _carouselView.Position, OldPosition = _position };
OnPositionChanging(ref positionChangingArgs);
if (positionChangingArgs != null && positionChangingArgs.Canceled)
{
_supressCarouselViewPositionChangedEvent = true;
_carouselView.PositionSelected -= _carouselView_PositionSelected;
_carouselView.PropertyChanged -= _carouselView_PropertyChanged;
_carouselView.Position = _position;
_carouselView.PositionSelected += _carouselView_PositionSelected;
_carouselView.PropertyChanged += _carouselView_PropertyChanged;
_supressCarouselViewPositionChangedEvent = false;
}
SetPosition(positionChangingArgs.NewPosition);
}
}`
Great @masiri201 you did it.
Many thanks for sharing your solution, it works great 🥇 !
@masiri201 I guess you can close the issue since you found how to fix it, at least this is going to be as documentation. :)
There is a considerable delay when sliding through the pages on the tab view, when i click the tabs it's no problem, but when i slide the pages the tab takes a while to reload and select the proper one. If somebody knows the solution for this please help me.