Behind the PowerShell Pipeline logo

Behind the PowerShell Pipeline

Subscribe
Archives
April 9, 2024

Decorating Your PowerShell WPF Script

Let's get back to exploring what we can do with Windows Presentation Foundation (WPF) PowerShell scripts. You've seen how to create a simple form using a `StackPanel`. I also demonstrated the flexibility of the `Grid` layout. I showed you how to add common controls like text boxes and buttons. However, you may want to add a little eye-candy to your forms. In this article, I'll show you how to add images to your forms, use progress bars, and more. I'll have a download link at the end so you can grab all of my demo code. Let's get started. ## Progress Bars Progress bars are a common control used in many applications. They provide feedback to the user about the status of a task. You can use them to show the progress of a file download, a script execution, or any other task that takes time to complete. Or you can use them as a simple graphing element. Once you've loaded the required WPF assemblies into your PowerShell session, you can use the [`Get-TypeMember`](https://bit.ly/3JVpGLB) command to explore the available properties and methods of the `ProgressBar` control.

Get a premium subscription for full article and archive access

Let's get back to exploring what we can do with Windows Presentation Foundation (WPF) PowerShell scripts. You've seen how to create a simple form using a StackPanel. I also demonstrated the flexibility of the Grid layout. I showed you how to add common controls like text boxes and buttons. However, you may want to add a little eye-candy to your forms. In this article, I'll show you how to add images to your forms, use progress bars, and more. I'll have a download link at the end so you can grab all of my demo code. Let's get started.

Progress Bars

Progress bars are a common control used in many applications. They provide feedback to the user about the status of a task. You can use them to show the progress of a file download, a script execution, or any other task that takes time to complete. Or you can use them as a simple graphing element.

Want to read the full issue?
GitHub Bluesky LinkedIn About Jeff
Powered by Buttondown, the easiest way to start and grow your newsletter.