How to combine imported and local resources in WPF user control
问题 I'm writing several WPF user controls that need both shared and individual resources. I have figured out the syntax for loading resources from a separate resource file: <UserControl.Resources> <ResourceDictionary Source="ViewResources.xaml" /> </UserControl.Resources> However, when I do this, I cannot also add resources locally, like: <UserControl.Resources> <ResourceDictionary Source="ViewResources.xaml" /> <!-- Doesn't work: --> <ControlTemplate x:Key="validationTemplate"> ... <