private void BtnPrint_Click(object sender, RoutedEventArgs e) { PrintDialog print = new PrintDialog(); if (print.ShowDialog() == true) { print.PrintVisual(spMain, "Invoice Test"); main.ClearOrderList(); main.ClearOrder(); main.GetCurrentDailyIncome(); main.Load_DailyTransactions(); MessageBox.Show("Invoice Printed!"); this.Close(); } }