public override void SetChildIndex(Control child, int newIndex) { //unwanted index changes may occur due to internal z-order update, so allow only intended ones. if (!this.owner.AllowPageIndexChange) { return; } this.owner.DisablePageIndexChange(); RadPageViewPage page = child as RadPageViewPage; this.ValidatePage(page); int currentIndex = this.IndexOf(page); if (this.suspendOwnerNotify == 0) { RadPageViewIndexChangingEventArgs args = new RadPageViewIndexChangingEventArgs(page, newIndex, currentIndex); this.owner.OnPageIndexChanging(args); if (args.Cancel) { return; } } base.SetChildIndex(child, newIndex); if (this.suspendOwnerNotify == 0) { this.owner.OnPageIndexChanged(new RadPageViewIndexChangedEventArgs(page, currentIndex, newIndex)); } }
public override void SetChildIndex(Control child, int newIndex) { if (!this.owner.AllowPageIndexChange) { return; } this.owner.DisablePageIndexChange(); RadPageViewPage page = child as RadPageViewPage; this.ValidatePage(page); int num = this.IndexOf((Control)page); if (this.suspendOwnerNotify == (byte)0) { RadPageViewIndexChangingEventArgs e = new RadPageViewIndexChangingEventArgs(page, newIndex, num); this.owner.OnPageIndexChanging(e); if (e.Cancel) { return; } } base.SetChildIndex(child, newIndex); if (this.suspendOwnerNotify != (byte)0) { return; } this.owner.OnPageIndexChanged(new RadPageViewIndexChangedEventArgs(page, num, newIndex)); }
protected internal virtual void OnPageIndexChanging(RadPageViewIndexChangingEventArgs e) { if (!this.CanRaiseEvents) { return; } EventHandler <RadPageViewIndexChangingEventArgs> eventHandler = this.Events[RadPageView.PageIndexChangingEventKey] as EventHandler <RadPageViewIndexChangingEventArgs>; if (eventHandler == null) { return; } eventHandler((object)this, e); }
protected internal virtual void OnPageIndexChanging(RadPageViewIndexChangingEventArgs e) { if (!this.CanRaiseEvents) { return; } EventHandler <RadPageViewIndexChangingEventArgs> eh = this.Events[PageIndexChangingEventKey] as EventHandler <RadPageViewIndexChangingEventArgs>; if (eh != null) { eh(this, e); } }