What is a first chance exception anyway?

This kb article is the best explanation of what a first chance exception is I have ever read (http://support.microsoft.com/kb/105675):

“However, if the application is being debugged, the debugger sees all exceptions before the program does. This is the distinction between the first and second chance exception: the debugger gets the first chance to see the exception (hence the name). If the debugger allows the program execution to continue and does not handle the exception, the program will see the exception as usual. If the program does not handle the exception, the debugger gets a second chance to see the exception. In this latter case, the program normally would crash if the debugger were not present.”

How do I catch first chance exceptions?


In visual studio under the debug > exceptions menu and tick the boxes shown in red:

How do you use a converter on a trigger


You can’t.

You can however use a data trigger and set the binding RelativeSource to Self. Data Triggers allow binding and bindings lets you have converters. Yey

Example:

       <Button Content="I change colour depending on my width for some reason">
            <Button.Triggers>
                <DataTrigger
                    Binding="{Binding
                    Path=Width,
                    RelativeSource={RelativeSource Self},
                    Converter={StaticResource isLessThanConverter},
                    ConverterParameter=50}"
                    Value="True">
                    <Setter Property="Button.Background" Value="Red" />
                DataTrigger>
            Button.Triggers>
        Button>

How to make Tooltips display on disabled WPF controls


This is old news but I find lots of people still don't know about this.

By default, WPF does not show tooltips on controls that have been disabled. To fix this, set the attached property ToolTipService.ShowOnDisabled.

E.g.
<Button Content="Example Button" 
 ToolTipService.ShowOnDisabled="True"  
 ToolTip="I’m visible even when the control is not enabled"/>