Behind the PowerShell Pipeline logo

Behind the PowerShell Pipeline

Subscribe
Archives
March 20, 2024

More WPF Controls

> I want to quickly apologize for the odd email you may have received. I was testing the Buttondown API for creating emails and I accidentally sent the email instead of saving it as a draft. I made a mistake by assuming I knew the default behavior of the API. A good reminder to read documentation and to do your homework before trying anything in code. Let's continue looking at the process of creating WPF-base PowerShell tools. In the last article, we looked at the basics of creating a WPF form and adding controls to it. In this article, we will look at more controls that we can add to our WPF form. I will continue expanding the script I started last time by adding more controls to the form. I will also add some basic functionality to the controls to demonstrate how to interact with them. I'll begin with adding an option for the user to enter an alternate set of credentials. This looks better when it is grouped so I will use a `GroupBox` control to contain the alternate credential controls. Instead of using `Write-Host` to display results, I will use a `DataGrid` in the form. This is the technique I rely on to display data in a WPF form.

Get a premium subscription for full article and archive access

I want to quickly apologize for the odd email you may have received. I was testing the Buttondown API for creating emails and I accidentally sent the email instead of saving it as a draft. I made a mistake by assuming I knew the default behavior of the API. A good reminder to read documentation and to do your homework before trying anything in code.

I will continue expanding the script I started last time by adding more controls to the form. I will also add some basic functionality to the controls to demonstrate how to interact with them. I'll begin with adding an option for the user to enter an alternate set of credentials. This looks better when it is grouped so I will use a GroupBox control to contain the alternate credential controls.

Listing Controls

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