C#从WPF打开PDF文件

C#从WPF打开PDF文件,c#,wpf,pdf,C#,Wpf,Pdf,我正在使用crystal reports创建一个pdf文件。正在成功导出和创建报告。但是,完成此操作后,我需要WPF应用程序根据指定路径自动打开报告: string path = svfl.FileName; <--SaveFileDialog //somecode here report.Export(); if (File.Exists(path)) { System.Windows.Forms.MessageBox.Show(path); File.Open(p

我正在使用crystal reports创建一个pdf文件。正在成功导出和创建报告。但是,完成此操作后,我需要WPF应用程序根据指定路径自动打开报告:

string path = svfl.FileName;  <--SaveFileDialog
//somecode here
report.Export();


if (File.Exists(path))
{
    System.Windows.Forms.MessageBox.Show(path);
    File.Open(path, FileMode.Open);
}
string path=svfl.FileName 试试这个:

if (File.Exists(path))
{
    Process.Start(path);
}