未処理の例外に次のコードを使用しています。
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (System.Diagnostics.Debugger.IsAttached)
{
// An unhandled exception has occurred; break into the debugger
System.Diagnostics.Debugger.Break();
}
e.Handled = true;
Error.Exp = e.ExceptionObject;
(RootVisual as Microsoft.Phone.Controls.PhoneApplicationFrame).Source = new Uri("/Error.xaml", UriKind.Relative);
}
このコードはコントロールをページに誘導する必要がありますが、(ブロックError.xaml
をコメントアウトした後でも) 例外のエラー メッセージと共に Visual Studio に移動します。if
ここで何が問題なのですか?
誤差の元は
GeneralTransform generalTransform1 = canvas1.TransformToVisual(start_rec);
エラー メッセージは、「引数の例外が処理されませんでした。パラメーターが正しくありません」でした。