For issues relating to the generic.xaml file which is used to define default styles of custom WPF controls.
When the system looks for a resource at the themes level, it first looks for it in the theme-specific file and then looks for it in generic.xaml.
Themes\generic.xaml is the resource file that the WPF will load auto matically for Custom controls.
generic.xaml is special because WPF makes it a special case for any custom controls with generic themes WPF's style lookup mechanism will automatically pick up the styles defined in the generic.xaml file