private void btnExport_Click(object sender, RoutedEventArgs e) { if (DsPrint.Tables[0].DefaultView.Count == 1) { string file_name = StartUp.GetFileNameExportWithSignature(DsPrint.Tables[0].DefaultView[0]); IntPtr windowHandle = new WindowInteropHelper(this).Handle; GridSearch.V_XuatPdf(file_name, windowHandle); } }