/// <summary> /// Save button click event /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { newTrack = new Track(DateTime.Now.Date, txtTitle.Text, txtDesc.Text); newTrack.keywords = txtKeywords.Text; if (cboSubjects.SelectedIndex >= 0) { newTrack.subject = (Subject)cboSubjects.SelectedItem; } usrClicked = cdClicked.Save; // Set the usrClicked value to save }
/// <summary> /// Cancel button click event /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { this.Hide(); usrClicked = cdClicked.Cancel; // Set the usrClicked value to cancel }