1. Define it directly in the control (form)
usercontrol. resources >
solidcolorbrush X: key = "textboxbackgroundcolor" color =" lemonchiffon " />
usercontrol. resources >
textbox background =" { staticresource textboxbackgroundcolor} " />
2. Define it directly in the resource dictionary
<Resourcedictionary
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Xmlns: x= "Http://schemas.microsoft.com/winfx/2006/xaml">
<SolidcolorbrushX: Key= "Textboxbackgroundcolor"Color= "Lemonchiffon"/>
</Resourcedictionary>
3. nested definition of other resource files in the resource dictionary
< Application. Resources >
< Resourcedictionary >
< Resourcedictionary. mergeddictionaries >
< Resourcedictionary Source = "Assets/styles. XAML" />
</ Resourcedictionary. mergeddictionaries >
</ Resourcedictionary >
</ Application. Resources >
Priorities to be sorted and written