<Window x:Class="ResourceDictionary_Sample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ResourceDictionary_Sample"
        mc:Ignorable="d"
        Title="MainWindow" Height="100" Width="200" Background="{DynamicResource background1}">
    <Window.Resources>
        <ResourceDictionary Source="backgrounds.xaml" />
    </Window.Resources>

    <Grid>
        <StackPanel>
            <Button Background="{StaticResource background2}" Margin="5">Button 1</Button>
            <Button Background="{StaticResource background2}" Margin="5">Button 2</Button>
        </StackPanel>
    </Grid>
</Window>
