Skip to content

Commit ddb7d06

Browse files
committed
Remove labels that don't display in code blocks
1 parent 756ff2c commit ddb7d06

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hub/apps/windows-dotnet-maui/dall-e-maui-windows.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ In this section, we'll install the SDK into the .NET MAUI project and initialize
3030

3131
1. If you haven't already installed the `Azure.AI.OpenAI` NuGet package, you can do so by running `dotnet add package Azure.AI.OpenAI -IncludePrerelease` from Visual Studio's terminal window.
3232

33-
1. Once installed, you can initialize the `OpenAIClient` instance from the SDK with your OpenAI API key as follows:
33+
1. Once installed, you can initialize the `OpenAIClient` instance from the SDK with your OpenAI API key in `MainPage.xaml.cs` as follows:
3434

35-
```csharp MainPage.xaml.cs
35+
```csharp
3636
private OpenAIClient _chatGptClient;
3737
private Guid _sessionGuid = Guid.Empty;
3838
private string openAIKey = "MY_OPEN_AI_API_KEY";
@@ -65,7 +65,7 @@ Next, we'll modify the user interface to include an `Image` control that display
6565

6666
1. Add a `StackLayout` containing a `Label` control and a `CheckBox` control to `MainPage.xaml` below the `LocationEntry` control to allow users to select whether to generate an image:
6767

68-
```xml MainPage.xaml
68+
```xml
6969
...
7070
<Entry
7171
x:Name="LocationEntry"
@@ -84,7 +84,7 @@ Next, we'll modify the user interface to include an `Image` control that display
8484

8585
1. Add an `Image` control below the `SmallLabel` control to display the generated image:
8686

87-
```xml MainPage.xaml
87+
```xml
8888
...
8989
<Image x:Name="GeneratedImage"
9090
WidthRequest="256"
@@ -101,7 +101,7 @@ In this section, we'll add a method to handle image generation and call it from
101101

102102
1. Add a method named `GetImageAsync` to handle image generation. The new method will call the OpenAI API to generate an image based on the prompt we'll build in the next step. It returns an `ImageSource` object that is used to display the image in the UI:
103103

104-
```csharp MainPage.xaml.cs
104+
```csharp
105105
public async Task<ImageSource> GetImageAsync(string prompt)
106106
{
107107
Response<ImageGenerations> imageGenerations = await _chatGptClient.GetImageGenerationsAsync(
@@ -120,7 +120,7 @@ In this section, we'll add a method to handle image generation and call it from
120120

121121
1. Add the following code to the end of the `GetRecommendation` method to conditionally call the `GetImageAsync` method and display the generated image:
122122

123-
```csharp MainPage.xaml.cs
123+
```csharp
124124
...
125125
if (IncludeImageChk.IsChecked)
126126
{

0 commit comments

Comments
 (0)