I could suggest using an approach similar to what we are using in the implicit styles mechanism for styling our controls. I have prepared a sample project which uses several dependency properties on a user control, which are used to pass brushes or states and are set in styles targeting that user control in each of the used themes. When the theme is changed, all the resources for it should be remerged, which is the point when you could know which theme the user had chosen and the style for the custom form could be remerged as well. The framework should take care of applying the new style. Furthermore, I have created a property that is set/unset when the focus state of the form is changed by overriding the OnGotKeyboardFocus and OnLostKeyboardFocus of the form and named it IsFocusedWithin. It is used in the trigger in the style to change the HeaderForeground dependency property.
In the project I have added the Office2016 and the VisualStudio2013 themes, but the approach is the same for any other theme(s) you might to choose to use in noXAML scenario.
As for the brushes - there are different brushes for each of the themes which have different purposes and there is no uniform approach to the count or the naming of the palette brushes in the themes in general which stems from their core design differences.
If you would not want to use a style targeting the custom user control, you can use a similar approach with a style for each theme targeting only the TextBlock via a DynamicResource reference and a DataTrigger in the style that binds to a custom property of the form (as proposed above) and changes the foreground.
I hope that one of theres would be an acceptable solution for your request. If you have any other questions, please do not hesitate to contact us further.
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin
, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.