PS C:\>

Powerfull like PowerShell

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework.

Use MahApps.metro built-in dialogs

Apply beautiful modal dialog into your project.

How to apply a theme on your GUI?

Some tips on how to apply a theme on your GUI ...

Monday, 16 April 2018

PowerShell WPF - Customize TreeView Icon



       I have seen many people struggle with this so I decided to write something about TreeView in PowerShell. 

The script in this post is based on the project available here (written in C#). I simply rewrote it in PowerShell and added my personal touch.  He displayed a drive image if the TreevieItem was a drive and a folder image otherwise. I extended the principle a little; you can specify directly in your script which kind of image you want to use in which case.



Share:

Thursday, 12 April 2018

Window LifeTime Events in PowerShell


       In this post I’ll explain the lifetime of your window from the moment it is initialized and the moment it's destroyed. I hope this post will help you achieve easily what you seek and could be time-saving in some case.

What I’m going talk about here?

«To find it you must look beyond what you see» Rafiki
Everything has its lifecycle 😊. So does your window in PowerShell. It follows the same rule as in C# when you load it in PowerShell. It’s well explained here.



Share:

Monday, 9 April 2018

PowerShell_Charts - Introduction to LiveCharts


As we all know flat design is the new black with material design and etc. So basically we are following the trend here.

Displaying graph does not escape this rule. Personnally, I wanted to do something about this for a while but I had no idea where to start. I wanted something compatible with MahApps, WPF, PowerShell and be “pretty” at the same time. And then I found this website:




So I began my little research and found nothing on the web L or maybe I was unlucky. I started testing the assembly and what a surprise! It works pretty well with Mahapps and WPF!

You can see a little preview of the graph in action here:




The only problem is the “type” of data passed to those graphs. It’s quite difficult to understand for a non-developer. So I came up with the idea to start a series of tutorials for each graph presented on their website and how to handle them in PowerShell.


I’ve not yet tested the “Material design” but it should come really soon on this blog too.
The source code of the preview is available in my git repository for those who can't wait.
See you next time! 😉


Share:

Monday, 2 April 2018

Powershell_WPF - Part V - Display Dynamic content



In this post, I will show you how to add dynamic content inside a WPF window in PowerShell. Most of the time, we display dynamic data inside a Datagrid or a Listview, but what if we want to create our own display for each item? 

Recently I came across this post: Let’s play with SNCF API and Powershell!” written by Etienne Deneuve. You can get a list of the next train in a specific train station.

What‘s that got to do with us?

The answer is simple, this script will return a dynamic result for each query. And that’s a good example to use. Here is a window with a datagrid to show what we have done up until now, and a new block to show what could be done with a dynamic display.





Share:

Monday, 26 March 2018

Add multiple buttons in Datagrid


If you are reading this, that means you wanted to add a button inside a Datagrid in PowerShell. 
Let us suppose that you need to add one or multiple buttons inside a single column in a datagrid. Data will be loaded inside the gridview and at the same time: n-number of command buttons need to be added to each row. Something like this:


Share:

Monday, 19 March 2018

Mahapps Custom Dialog



When you design your apps, sometimes you need to add a custom content to your dialog form. In this post, I'm going to show you how to create your own custom dialog with PowerShell using Mahapps.

Here is a preview of the result:


You can put whatever content you want inside the dialog. Each dialog in the picture is a custom dialog.

Share:

Popular Posts

Join us on Facebook

STATS

Contact Form

Name

Email *

Message *

image
Hello,

I'm Kevin RAHETILAHY

I'm a system and desktop engineer who focuses on scripts, development and maintenance of the software and systems on computers. I also like web design and playing with photoshop. Great fan of volley-ball and symphonic metal.

I created this blog for the main purpose of sharing my knowledge, and solved issues on which I spent times and that may help others. Hope you'll appreciate my works and will help you in yours.