>>For WPF I use:
>>
>>
#if !DEBUG // Don't use in debug mode.
>> Application.Current.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhandledException);
>>#endif
>>
>Hi,
>I did it in XAML:
<Application x:Class=“Whatever.App”
> xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”
> xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”
> StartupUri=“MainWindow.xaml”
> DispatcherUnhandledException=“HandleUnHandled”>
></Application>
But you're right - better to not use it in Debug mode......
>Are you doing much WPF currently?
>I've been pretty immersed in WPF for the last three/four weeks and like it more all the time. Wouldn't go back to Winforms if they paid me (well, I suppose I would but I'd rather not <g>)
>Finally got a real handle on DependencyObjects and, after implementing a few, a better understanding of the benefits of attached properties....
When VFP was discontinued, I started off in WinForms, which was OK, but nothing fantastic. Then I did a silverlight project which I really enjoyed writing. After that I wanted to rewrite the silverlight control I had created for my desktop app. WPF seemed the easiest solution for that. So I did it, but I wasn't fond of how WPF and WinForms played together. Despite the steep learning curve, I was enjoying WPF more than WinForms so I scrapped my WinForms libs (which were still pretty new) and moved everything over to WPF. I haven't looked back since, I am really enjoying coding in WPF. Currently I'm coding mostly in WPF, VFP and a little C++.
Understanding WPF can be a bear. But once you get it, the simplicity with which you can handle complex display problems is a amazing. I was heading towards dynamic interfaces in VFP with WPF my interface can be fully dynamic with almost no extra coding. I love it.