According to the Microsoft documentation :
(Text removed from documentation)
The ThemeResource is a technique for retrieving values for a XAML attribute defined elsewhere in a XAML resource dictionary. This markup extension has the same basic purpose as the StaticResource markup extension.
The difference in behavior regarding the {StaticResource} tag extension is that a ThemeResource reference can dynamically use different dictionaries as the primary search location, depending on the theme currently being used by the system.
When and how to use {ThemeResource} instead of {StaticResource}?
The rules by which ThemeResource is resolved to an item in a resource dictionary are usually the same as StaticResource. A ThemeResource search can be extended to ResourceDictionary files that are referenced in a ThemeDictionaries collection, but a StaticResource can also do this. A diferença é que um ThemeResource pode ser reavaliado no tempo de execução e um StaticResource não.
References:
link
link