I have the following code to changing my theme (the same used by Xaml-Controls-Gallery):
if (Window.Current.Content is Fram