Skip to content

Commit 0a1695f

Browse files
committed
1 parent cf30dc9 commit 0a1695f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hub/apps/how-tos/github-copilot-winui-vs.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ content-type: how-to
1414

1515
# Use GitHub Copilot to create WinUI 3 / Windows App SDK apps in Visual Studio
1616

17-
In this how-to, we'll demonstrate how [GitHub Copilot](https://github.com/features/copilot) can be used to build WinUI 3 / Windows App SDK desktop apps in Visual Studio. This guide builds upon *[What is the GitHub Copilot extension for Visual Studio?](https://learn.microsoft.com/visualstudio/ide/visual-studio-github-copilot-extension)*, offering tailored tips and best practices for Copilot-assisted WinUI 3 app development.
17+
In this how-to, we'll demonstrate how [GitHub Copilot](https://github.com/features/copilot) can be used to build WinUI 3 / Windows App SDK desktop apps in Visual Studio. This guide builds upon *[What is the GitHub Copilot extension for Visual Studio?](/visualstudio/ide/visual-studio-github-copilot-extension)*, offering tailored tips and best practices for Copilot-assisted WinUI 3 app development.
1818

1919
:::image type="content" source="images/github-copilot-winui-vs/github-copilot-extension-example.gif" alt-text="Animated screenshot that shows the code completion capabilities of the GitHub Copilot extension.":::
2020

@@ -40,37 +40,37 @@ The GitHub Copilot extension provides real-time code suggestions and completions
4040

4141
<!-- todo: animated gifs as an optimization -->
4242

43-
:::image type="content" source="images/github-copilot-winui-vs/1-basic-autocomplete.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension.":::
43+
:::image type="content" source="images/github-copilot-winui-vs/1-basic-autocomplete.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension (basic autocomplete).":::
4444

4545
### Generate multiple autocomplete suggestions
4646

4747
Select `Edit` -> `Copilot suggestions` -> `Open Copilot`. A window will open with a list of suggestions based on the latest cursor position:
4848

49-
:::image type="content" source="images/github-copilot-winui-vs/2-generate-multiple-autocomplete-suggestions.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension.":::
49+
:::image type="content" source="images/github-copilot-winui-vs/2-generate-multiple-autocomplete-suggestions.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension (multiple autocomplete).":::
5050

5151
### Prompt Copilot with plain-language comments
5252

5353
Although Copilot is used primarily for code completion, you can also use natural language comments to guide Copilot in generating specific code snippets. For example, you can use comments to request a specific feature or functionality:
5454

55-
:::image type="content" source="images/github-copilot-winui-vs/3-prompt-copilot-with-inline-comment.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension.":::
55+
:::image type="content" source="images/github-copilot-winui-vs/3-prompt-copilot-with-inline-comment.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension (prompting).":::
5656

5757
### Use temporary comments to add code from other files to Copilot's context
5858

5959
If you're working on a code-behind file and want Copilot to incorporate context from the associated XAML file, you can use temporary comments to include this additional code within Copilot's context. Here's an example of how you can specify the XAML code first, and then have Copilot generate the corresponding C# code:
6060

61-
:::image type="content" source="images/github-copilot-winui-vs/4-add-context-temporary-comments.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension.":::
61+
:::image type="content" source="images/github-copilot-winui-vs/4-add-context-temporary-comments.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension (context expansion).":::
6262

6363
### Ask Copilot to explain how something works with inline comments
6464

6565
You can use inline comments to ask Copilot to explain how a specific piece of code works. This is similar to using the Copilot Chat Extension, except your prompt is typed directly into the code editor:
6666

67-
:::image type="content" source="images/github-copilot-winui-vs/5-ask-copilot-inline-explanation.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension.":::
67+
:::image type="content" source="images/github-copilot-winui-vs/5-ask-copilot-inline-explanation.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension (explain).":::
6868

6969
### Use Copilot to test code standards
7070

7171
You can use Copilot to generate code that adheres to your project's coding standards, and to test any given snippet's adherence to those standards. Here's an example of how you can use inline comments to specify two conventions, and then have Copilot validate the code snippet against these conventions:
7272

73-
:::image type="content" source="images/github-copilot-winui-vs/6-enforce-code-standards.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension.":::
73+
:::image type="content" source="images/github-copilot-winui-vs/6-enforce-code-standards.png" alt-text="Screenshot that shows the code completion capabilities of the GitHub Copilot extension (standards).":::
7474

7575
## Recap
7676

0 commit comments

Comments
 (0)