/// <summary>
 /// Creates a new event arguments instance.
 /// </summary>
 /// <param name="item">The side menu item.</param>
 /// <param name="oldControl">The old control.</param>
 /// <param name="newControl">The new control.</param>
 public SideMenuItemControlChangedEventArgs(SideMenuItem item, ISideControl oldControl, ISideControl newControl)
     : base(item)
 {
     this.OldControl = oldControl;
     this.NewControl = newControl;
 }
Esempio n. 2
0
 /// <summary>
 /// An event handler called when the control is set.
 /// </summary>
 /// <param name="control">The control.</param>
 private void OnControlSet(ISideControl control)
 {
     // Save the old control for this item.
     ISideControl old = this.control;
     // Set the new control for this item.
     this.control = control;
     // Call the event handler.
     if (this.ControlChanged != null) this.ControlChanged(this, new SideMenuItemControlChangedEventArgs(this, old, control));
 }