2010-02-12 48 views

cevap

13

kullanabilirsiniz DispatcherUnhandledException:

XAML (App.xaml): Kod Arkası (App.xaml.cs/vb

<Application x:Class="App.App" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    StartupUri="wndMain.xaml" DispatcherUnhandledException="Application_DispatcherUnhandledException"> 

.

private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) 
{ 
    // Handle error here 

    ... 

    // Prevent default unhandled exception processing by WPF 
    e.Handled = true; 
} 

more here kadar okundu Daima ilk etapta hata işlemenin doğru miktarda yapılmasını sağlayın.Sadece hataların bu yönteme girmesine izin vermeyin

İlgili konular