Giter Club home page Giter Club logo

ShowUI is the PowerShell module for building user interfaces in script. It's the merger of two previous projects: PowerBoots (by Joel Bennett @Jaykul) and WPK (by James Brundage @StartAutomating), bringing the best of both these projects together to make it easier than ever to create flexible user interfaces directly from PowerShell.

ShowUI is primarily focused on building WPF user interfaces that behave as part of the PowerShell ecosystem: using data binding to expose the data on the objects that come out of PowerShell, and generating output objects into the PowerShell pipeline.

Your first ShowUI program

New-Button -Content "Hello World" -Show

This example is actually more verbose than it needs to be, because the -Content parameter in ShowUI commands is always positional, so the first non-named argument you pass will be used for that. The same is true for the -Children parameter of panels, and in fact, each of the other similar parameters that WPF uses to contain additional controls: Items, Blocks, and Inlines.

Additionally, each control command has an alias available without the New- verb, so you could just call Button instead of New-Button ... and of course, since our button doesn't do anything, we could just as easily have used a Label, and written:

Label "Hello World" -Show

Note: "Label" is also the name of an executable for labelling drives in Windows, make sure ShowUI is imported before you run that command!

A much more practical example

Of course, labels and buttons (and images, charts and tables) are all well and good, but if you're trying to create a user interface in PowerShell the chances are that you're probably trying to make it easier for non-PowerShell users to run a script which requires data entry. Try our Get-Input command, and notice that we can create controls in "CustomControls" with a [OutputType()] specified, and they'll be picked up when you require them by specifying a type in the Get-Input hashtable.

$User = [ordered]@{
   FirstName = "John"
   LastName = "Doe"
   BirthDate = [DateTime]
   UserName = "JDoe"
}

Get-Input $User -Show

showui's Projects

showui icon showui

ShowUI is a PowerShell module to help build graphical user interfaces in script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.