From the course: AI-Powered Development: GitHub Copilot in Visual Studio

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

PortChecker: The Windows UI

PortChecker: The Windows UI

- [Instructor] Now that the class library was in place and working with the console application, it was time to create a Windows version. So I added this PortChecker WPF project to the solution, and then I asked Copilot agent to help me generate the project. This is one area that often gets overlooked. When we think about code generation, we tend to focus on logic and structure, not the UI, but Copilot is equally adept at generating web interfaces or any of the Windows UI components we might need. To give the agent a clear target, I stubbed in a couple of tabs, some basic UI with the correct headers. You can see them here, there's one called List Ports and there's another one called Check port. That way I could tell Copilot exactly where to place the UI elements, and it worked. My first request was to add the code in this List Ports tabs. So here's my prompt, "In the portChecker application, on the List Ports Tab…

Contents