2
I have a small example where I created an application-level Resource:
<Application x:Class="teste1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:teste1"
StartupUri="MainWindow.xaml">
<Application.Resources>
<SolidColorBrush x:Key="texto" Color="Yellow"/>
<SolidColorBrush x:Key="texto1" Color="#FF5E1AC1"/>
<Color x:Key="fundo1">#FFBF3B3B</Color>
</Application.Resources>
What should I do to change this "Resource" to a separate file so that all style settings stay exclusively in that file?
I tried some research related to "Merged Resourcedictionaries" but without success.
That’s all I got. It’ll make sense?
<Application x:Class="teste1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:teste1"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!--<ResourceDictionary.MergedDictionaries>-->
<ResourceDictionary Source="MeuResourceDictionary/MeuResourceDictionary.xaml"/>
<!--</ResourceDictionary.MergedDictionaries>-->
</Application.Resources>