ILRepack.IntegrationTests/Scenarios/WPFThemingAndLibraryStyles/MainWindow.xaml (21 lines of code) (raw):
<Window x:Class="WPFThemingAndLibraryStyles.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:classLibrary="clr-namespace:ClassLibrary;assembly=ClassLibrary"
Title="MainWindow" Height="350" Width="525" Loaded="MainWindowLoaded">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ClassLibrary;component/TextBlockStyles.xaml" />
<ResourceDictionary Source="/ClassLibrary;component/ButtonStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="{classLibrary:GenericBasedThemeResourceKey ResourceKey=Background}" Color="Yellow" />
</ResourceDictionary>
</Window.Resources>
<StackPanel>
<classLibrary:DummyUserControl />
<Button x:Name="StyledButton" Style="{StaticResource PredefinedButtonContentStyle}" />
<TextBlock x:Name="StyledTextBlock" Style="{StaticResource RedTextTextBlock}" HorizontalAlignment="Center" Text="Red text" />
<classLibrary:TemplatedDummyUserControl x:Name="TemplatedDummyUserControl" />
</StackPanel>
</Window>