My questions is very specific to ThemeResources in a Windows 10 Store App. Unfortunately several things available in \"classic\" WPF are different or not available here.
There is a way how to kinda set ThemeResource
in code... I've tested it only on W10 Creators Update so it may not work on older versions, but you can create your own resource that is referencing the original ThemeResource
you want to use and then use this resource:
XAML:
C#:
element.BorderBrush = (SolidColorBrush)Resources["MyBorderBrush"];
The border color of element
will be the same as the Accent Color selected in Windows Settings and it will change even when your app is running and user changes it.