Example #1
0
 public async Task SetPresentationFrameworkTheme(Dispatcher dispatcher, Uri resourceUri)
 {
     await dispatcher.InvokeAsync(() => {
         if (resourceUri != null)
         {
             ThemeManager.SetPresentationFrameworkTheme(resourceUri);
         }
         else
         {
             ThemeManager.ClearPresentationFrameworkTheme();
         }
         UxThemeExNativeMethods.UxBroadcastThemeChange();
     }, DispatcherPriority.ContextIdle);
 }
 /// <summary>
 ///   Removes the Aero theme, falling back to the default theme.
 /// </summary>
 /// <returns>
 ///   <see langword="true"/> on success; otherwise <see langword="false"/>.
 /// </returns>
 public static bool RemoveAsCurrentTheme()
 {
     return(ThemeManager.ClearPresentationFrameworkTheme());
 }