Allow the WPF viewer theme to be set using resources for the current window instead of setting resources on application level. Now the theme can be set using <Window, but this approach will not work for the Search window, which is a separate window and therefore fails to resolve its styles.