As a parallel to DRY for code I don't like having the same property assignments in XAML. I've seen code examples where quite a bit of code can be consolidated as a style. Once that's done and cleaned up more code can be represented by another style that's based on the initial style that has some more specific edits, and so on. There comes a point where this leads to styles that are way to "clever". A change in one of the styles leads to a cascading affect to all those that depend on it. Is there a rule of thumb or general guideline to remember when using `Style ... BasedOn={...}`?

An example from Head First C# and using the [WPF version](https://github.com/head-first-csharp/third-edition/blob/master/hfcsharp3e_WPF_download.pdf). On page 754 they have the example shown below. As this is an introduction there are several property assignments that can be consolidated using styles.

```
    <StackPanel Margin="20">
        <TextBlock Foreground="White" FontFamily="Segoe" FontSize="20px"
                   FontWeight="Bold" Text="{Binding TeamName}" />
        <TextBlock Foreground="White" FontFamily="Segoe" FontSize="16px" 
                   Text="Starting Players" Margin="0,5,0,0"/>
        <ListView Background="Black" Foreground="White"  Margin="0,5,0,0"
                                   ItemTemplate="{StaticResource PlayerItemTemplate}"
                                   ItemsSource="{Binding Starters}" />
        <TextBlock Foreground="White"  FontFamily="Segoe" FontSize="16px"
                   Text="Bench Players" Margin="0,5,0,0"/>
        <ListView Background="Black" Foreground="White" ItemsSource="{Binding Bench}" 
                  ItemTemplate="{StaticResource PlayerItemTemplate}" Margin="0,5,0,0"/>
    </StackPanel>

```

Refactoring using styles to remove duplicated property assignments. This shows an intermediary step where the `Margin` property could further be consolidated.

```
<StackPanel Margin="20">
    <StackPanel.Resources>
        <Style x:Key="whiteForground" TargetType="TextBlock">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="FontFamily" Value="Segoe" />
        </Style>
        <Style TargetType="ListView">
            <Setter Property="Margin" Value="0,5,0,0" />
            <Setter Property="Background" Value="Black" />
            <Setter Property="Foreground" Value="White" />
        </Style>
        <Style x:Key="appliedMargin" TargetType="TextBlock" BasedOn="{StaticResource whiteForground}">
            <Setter Property="Margin" Value="0,5,0,0" />
        </Style>
    </StackPanel.Resources>
    <TextBlock Style="{StaticResource whiteForground}" FontSize="20px"
                FontWeight="Bold" Text="{Binding TeamName}" />
    <TextBlock Style="{StaticResource appliedMargin}" FontSize="16px"
                Text="Starting Players" />
    <ListView ItemTemplate="{StaticResource PlayerItemTemplate}"
                ItemsSource="{Binding Starters}" />

    <TextBlock Style="{StaticResource appliedMargin}" FontSize="16px"
                Text="Bench Players" />
    <ListView ItemsSource="{Binding Bench}"
                ItemTemplate="{StaticResource PlayerItemTemplate}" />
</StackPanel>

```