TechNinjutsu‎ > ‎

Adding Elysium for Windows 8/WP7 style in Win 7 using WPF with C#

posted Sep 26, 2012, 7:27 AM by d graham   [ updated Jul 1, 2013, 5:32 PM ]
Elysium is a 'Windows 8 style', open source, theme component released under the MIT license which is both free as in beer/soda and free as in speech.  I have decided to include Elysium in CdmaDevTerm(an open source project I develop).

Elysium provides two Windows 8 style themes which come in "Light" and "Dark"


 and Dark: - is where the project hosting is, it is also available via nuGet now though.

In order to add Elysium to your project, grab the handful of .dll files which come with the example project which is provided by the authors and add them to your project:


Then on your xamal file add the name space bellow to the Window and preface the Window tag with the new namespace (metro:Window) :

You will also have to change the class the main window inherits from in the code-behind file:
public partial class MainWindow : Elysium.Theme.Controls.Window

Then the last trick is in the main App.xamal you are going to want to add something like this:
                <ResourceDictionary Source="/Elysium.Theme;component/Themes/Generic.xaml"/>
            <!--Bug in .Net 4:>
            <Style TargetType="{x:Type Window}"/>

The theme may be changed by calling for example:


which accepts as a parameter your choice of accent color.