private void File_Button_Click(object sender, RoutedEventArgs e)
{
Button senderButton = sender as Button;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.UseShellExecute = true;
proc.StartInfo.FileName = senderButton.CommandParameter as String;
try
{
proc.Start();
}
catch
{
// No 'Open' command associated with this filetype in the registry
ShowOpenWithDialog(proc.StartInfo.FileName);
}
}