diff --git a/src/Avalonia.Controls/Presenters/CarouselPresenter.cs b/src/Avalonia.Controls/Presenters/CarouselPresenter.cs index f77f249c46..42910cdc48 100644 --- a/src/Avalonia.Controls/Presenters/CarouselPresenter.cs +++ b/src/Avalonia.Controls/Presenters/CarouselPresenter.cs @@ -39,7 +39,7 @@ namespace Avalonia.Controls.Presenters Carousel.PageTransitionProperty.AddOwner(); private int _selectedIndex = -1; - // private Task _current; + // private Task _current; private Task _currentTransition; private int _queuedTransitionIndex = -1; @@ -130,10 +130,10 @@ namespace Avalonia.Controls.Presenters #pragma warning disable 4014 var newIndex = SelectedIndex; - - if(SelectedIndex < 0) + + if (SelectedIndex < 0) { - if(Items != null && Items.Count() > 0) + if (Items != null && Items.Count() > 0) { newIndex = 0; } @@ -142,11 +142,11 @@ namespace Avalonia.Controls.Presenters newIndex = -1; } } - + MoveToPage(-1, newIndex); #pragma warning restore 4014 } - break; + break; } } @@ -226,7 +226,7 @@ namespace Avalonia.Controls.Presenters int fromIndex = (int)e.OldValue; int toIndex = (int)e.NewValue; - for (;;) + for (; ; ) { _currentTransition = MoveToPage(fromIndex, toIndex); await _currentTransition;