Styles/MainStyle.xaml
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="BaseBtn" TargetType="Button">
<Setter Property="Padding" Value="6,2,6,2"></Setter>
</Style>
</ResourceDictionary>
<Application x:Class="CZISC.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:CZUC="clr-namespace:CZISC.UC"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles/MainStyle.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Button" BasedOn="{StaticResource ResourceKey=BaseBtn}">
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
http://www.cnblogs.com/caixiaodong/archive/2010/07/03/1770375.html