Loading...

Powershell : Add a theme to your GUI with Powershell and XAML

5 A+ A-


In my previous post, I have shown you how to create a GUI using XAML and Powershell.



This time, I will present you how to add a theme to your GUI with better controls design, i will just present some possibilities to use.

In my case I used a theme called Elysium with Visual Studio 2012.
I applied this theme to the tool Microsoft EXE extractor.


How to download it ?

Elysium has been created by Aleksandr Vishnyakov, very great job from him.
You can download it here.


Prerequisites ?

It requires at least .Net Framework 4.5


How to install it ?
  • Once You have downloaded the Elysium, run "Elysium SDK.exe"
  • Click on "I agree ..." and "Next"
  • Check all and click on "Install"
  • Click on "Finish"


How to use it ?
  • Create a WPF project using Visual Studio 
  • Add it to your references in Visual Studio
Right click on references
Choose Elysium
Elysium is now added
  • Add some controls to your form as below
  • Now add below lines to the beginning of the XAML part
              xmlns:metro="http://schemas.codeplex.com/elysium"
              xmlns:params="http://schemas.codeplex.com/elysium/params" 
              params:Manager.Theme="Light" 


  • Now your previous controls should be as below (so much pretty)

  • You can also choose the color which will be applied to your controls, using the below line : params:Manager.AccentBrush="Blue"
Controls using Blue color

Controls using LightCoral color

LightCoral color applied on all the GUI

  • You can applied metro style to your progressbar adding <metro:ProgressBar/> 
ProgressBar without Metro style
ProgressBar using Metro style
  • You can also change the progressbar for a ring adding <metro:ProgressRing/>
PprogressRing style


How to link your PS1, XAML and Elysium 

As presented in my previous post, you have to load the XAML from your PS1 file, and also to load elysium and Microsoft Drawing DLL.
Load Elysium and XAML from PS1


How to get DLL files ?


To use Elysium on a tool you have to integrate DLL files.

You can find them after generationg your vvisual Studio project.
You can also find them Here.


How to see more with Elysium ?

After installing Elysium, you can run a quick exe which will show different design from Elysium.
  • Run "Elysium Test app" from All programs
  • Elysium controls design example
Example of Buttons design
Example of Selectors and ranges design

  • Right click to see more
  • Switch "Theme type"
  • Light theme type
Light theme type design






You can find in the below rar file the new Microsoft EXE exctrator tool. 
You can extract the content in order to get the XAML and PS1 files.
Download the Tool


XAML 3025703589077731168

Enregistrer un commentaire

5 commentaires

Diagg a dit…

Avec un "greeting to Doctor Constantini" ça serai parfait non ?

Damien Van Robaeys a dit…

lol j'avais oublié qu'il avait fait un truc la-dessus the prof. Mais de mémoire la doc était pas terminée ou alors c'était pas la même méthode. Je me souvenais surtout de ce qu'avait fait la brochette :-)

Diagg a dit…

Donc t'as fait tout ça en solo sans aller le voir... Respect totale et toutes mes excuses, je pensais que tu t’étais inspiré de son travail. Big up the Dam !!!

Damien Van Robaeys a dit…

LOl pas de soucis. Yep, Kevin m'a montré quelques trucs parce qu'il utilise un autre thème mais moi j'aime bien Elysium et je voulais présenté un autre thème la semaine pro donc petite intro de thème :-).

Damien Van Robaeys a dit…

Hey Nico, je viens de regarder ce qu'il avait fait, c'était pas du tout la même méthode ni résultat, il avait créé un module, c'était bien plus complexe lol.

Accueil item

Award

Sponsors

Learn KQL in one month

You want to support me ?

Mes articles en français

Books in French


Stats