Galin Iliev's blog

Software Architecture & Development

Silverlight 4: Setting a global application theme

I am creating a SL4 application and I was looking for a way to make more shinier. Of course themes come to play here but the big questions is “How to setup a global theme?”

Search results returned a bunch of ideas with a lot of code like merging dictionaries etc… And I was thinking it should be simple, very simple.

I came across this post about Silverlight4 Toolkit April 2010 release. But still what suggested there didn’t work for me:

<Application xmlns=""

For some reason the highlighted part failed come into play. No result was seen…

So I found this very, very simple way. Just put those two lines in App.xaml.cs:

using ActiveTheme = System.Windows.Controls.Theming.BureauBlackTheme;
private void Application_Startup(object sender, StartupEventArgs e)
    ActiveTheme.SetIsApplicationTheme(this, true);
    this.RootVisual = new MainPage();

Hope this helps,