タイトルの通り。C# でのみこれを行う方法を知っていますが、WPF でこれを実行しようとすると、プログラムの起動時にファイル名を読み取るためにどこに何を追加すればよいかわかりません。
public static void Main(string[] args)
{
if (Path.GetExtension(args[0]) == ".avi" || Path.GetExtension(args[0]) == ".mkv")
{
string pathOfFile = Path.GetFileNameWithoutExtension(args[0]);
string fullPathOfFile = Path.GetFullPath(args[0]);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(pathOfFile, fullPathOfFile));
}
else
{
MessageBox.Show("This is not a supported file, please try again..");
}
}