Advertisement
parabola949

Untitled

Jun 10th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.16 KB | None | 0 0
  1. new Task(() =>
  2.                 {
  3.                     for (var x = 0;x<4;x++)
  4.                     {
  5.                         foreach (var i in themes)
  6.                         {
  7.                            
  8.                             Application.Current.Dispatcher.BeginInvoke(
  9.                                 DispatcherPriority.Background,
  10.                                 new System.Action(
  11.                                     () =>
  12.                                         ThemeManager.ChangeTheme(this, new Accent(i.Name, i.URI),
  13.                                             Theme.Light))).Wait();
  14.  
  15.                             Thread.Sleep(5);
  16.                            
  17.                         }
  18.                     }
  19.  
  20.                     Application.Current.Dispatcher.BeginInvoke(
  21.                                 DispatcherPriority.Background,
  22.                                 new System.Action(
  23.                                     () =>
  24.                                         ThemeManager.ChangeTheme(this, new Accent(themes[11].Name, themes[11].URI),
  25.                                             Theme.Dark)));
  26.                    
  27.                 }).Start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement