< Window .Resources > < Style TargetType ="Button" x:Key ="ButtonStyle" > < Setter Property ="Foreground" Value ="Blue" /> < Setter Property ="FontFamily " Value ="CourierNew" /> </ Style > < Style TargetType ="Button" x:Key ="TriggerButtonStyle" BasedOn ="{StaticResource ButtonStyle}" > < Style .Triggers > < Trigger Property ="IsPressed" Value ="True" > < Setter Property ="Foreground" Value ="Red" /> </ Trigger > </ Style.Triggers > </ Style > </ Window.Resources > 转载于:https://www.cnblogs.com/zuoyexinchen/archive/2008/10/13/1310284.html