First create dictionary as I explained here.
In my case I've created TriggersDictionary.xaml, so my main window XAML looks like this:

<Window x:Class="PlayingWithResource.MainWindow"
        Title="MainWindow" Height="350" Width="525">
                      Source= "TriggersDictionary.xaml">

        <Rectangle Style="{StaticResource styleWithTrigger}"></Rectangle>


My style (TriggersDictionary.xaml)

<ResourceDictionary xmlns=""

    <Style x:Key="styleWithTrigger" TargetType="Rectangle">
        <Setter Property="Fill" Value="LightGreen" />
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Fill" Value="Red" />


Here you can see property - this is event which will be executed as well as target type (in my case rectangle)
Example project you can download from here, and this article I wrote using this page.


2014-06-16 Update Properties which are supported for trigger, for rectangle, for example you can see here.