private void OnPagesChanged(object sender, NotifyCollectionChangedEventArgs e) { int num = (int)NotifyCollectionChangedEventArgsExtensions.Apply(e, (Action <object, int, bool>)((o, i, c) => this.SetupPage((Page)o, i)), (Action <object, int>)((o, i) => this.TeardownPage((Page)o, i)), new Action(this.Reset)); this.SetControllers(); UIViewController uiViewController = (UIViewController)null; if (this.Tabbed.CurrentPage != null) { uiViewController = this.GetViewController(this.Tabbed.CurrentPage); } if (uiViewController == null || uiViewController == base.SelectedViewController) { return; } base.SelectedViewController = uiViewController; }
private void OnPagesChanged(object sender, NotifyCollectionChangedEventArgs e) { this.ignoreNativeScrolling = true; int num1 = (int)NotifyCollectionChangedEventArgsExtensions.Apply(e, (Action <object, int, bool>)((o, i, c) => this.InsertPage((ContentPage)o, i)), (Action <object, int>)((o, i) => this.RemovePage((ContentPage)o, i)), new Action(this.Reset)); this.PositionChildren(); this.ignoreNativeScrolling = false; int num2 = 4; if (num1 != num2) { return; } int index = this.Carousel.CurrentPage != null ? MultiPage <ContentPage> .GetIndex(this.Carousel.CurrentPage) : 0; if (index < 0) { index = 0; } this.ScrollToPage(index, true); }