views:

21

answers:

1

This works, but I don't think I'm doing it right.

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/Aam.Gui;component/AamBlue.xaml" />
            <ResourceDictionary>
                <gui:RepKeyValueConverter x:Key="RepKeyValueConverter"/>
            </ResourceDictionary>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>
+3  A: 

You can declare resources directly inside the outer ResourceDictionary and save yourself one pair of ResourceDictionary tags:

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/Aam.Gui;component/AamBlue.xaml" />
        </ResourceDictionary.MergedDictionaries>
        <gui:RepKeyValueConverter x:Key="RepKeyValueConverter"/>
    </ResourceDictionary>
</UserControl.Resources>
Quartermeister