public ContentChangeArgs(RentItUserControl newControl, string newTitle) { NewControl = newControl; NewTitle = newTitle; }
/// <summary> /// Handles change requests to the content of the window to a new control. /// </summary> /// <param name="sender">The sender of the request.</param> /// <param name="args">The arguments specifying the new control.</param> private void ChangeContent(object sender, ContentChangeArgs args) { Content = args.NewControl; TopBar.Title = args.NewTitle; }
/// <summary> /// Fires a content change event to change the current /// content of the main form with the one specified in /// control. /// </summary> /// <param name="control"> /// The new RentItUserControl to display as main content. /// </param> /// <param name="title"> /// The new top bar title. /// </param> protected void FireContentChangeEvent(RentItUserControl control, string title) { if (ContentChangeEvent != null) ContentChangeEvent(this, new ContentChangeArgs(control, title)); }