Skip to content

Commit 36ddf66

Browse files
Merge pull request #3622 from Syncfusion-Content/hotfix/hotfix-v31.1.17
DOCINFRA-2341_merged_using_automation
2 parents e2c1770 + 941ec26 commit 36ddf66

File tree

2 files changed

+58
-43
lines changed

2 files changed

+58
-43
lines changed

MAUI/DataForm/AI-Powered-Smart-DataForm.md

Lines changed: 56 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Create a [.NET MAUI app](https://learn.microsoft.com/en-us/dotnet/maui/get-start
1919

2020
### Step 2: Set up Azure OpenAI
2121

22-
To enable AI functionality in your .NET MAUI Scheduler, first ensure that you have access to [Azure OpenAI](https://azure.microsoft.com/en-in/products/ai-services/openai-service). In the Azure portal, create an Azure OpenAI resource and deploy a model such as GPT-35. Assign a deployment name (for example, GPT35Turbo) that you’ll reference in your application code. Finally, copy the API key and endpoint URL from the resource settings, as these are required for authentication and communication with the OpenAI service.
22+
To enable AI functionality in your .NET MAUI DataForm, first ensure that you have access to [Azure OpenAI](https://azure.microsoft.com/en-in/products/ai-services/openai-service). In the Azure portal, create an Azure OpenAI resource and deploy a model such as GPT-35. Assign a deployment name (for example, GPT35Turbo) that you’ll reference in your application code. Finally, copy the API key and endpoint URL from the resource settings, as these are required for authentication and communication with the OpenAI service.
2323

2424
### Step 3: Connect to the Azure OpenAI
2525

@@ -168,33 +168,42 @@ Within the base service class (AzureBaseService), initialize the OpenAIClient wi
168168

169169
### Step 1: Designing the User Interface
170170

171-
#### Editor and Button - Capturing User Prompts
171+
#### Editor and Button - Capturing User Prompts
172172

173173
Use an Editor to collect natural language prompts and a Button to send the prompt to Azure OpenAI. The Editor allows users to describe the form they want, while the Button triggers the logic to process the prompt and generate the form.
174174

175175
{% tabs %}
176176

177177
{% highlight xaml %}
178178

179-
<VerticalStackLayout Margin="20" VerticalOptions="Center" HorizontalOptions="Center">
180-
<Label x:Name="describeLabel"
181-
Text="Create AI-Powered Smart Forms in .NET MAUI for Efficient Productivity."
182-
LineBreakMode="WordWrap" FontSize="Small" FontAttributes="Bold" />
183-
<Grid ColumnDefinitions="0.7*,0.3*" Margin="10" ColumnSpacing="5">
184-
185-
<Editor AutoSize="TextChanges" x:Name="entry"
186-
PlaceholderColor="Gray"
187-
VerticalOptions="Center"
188-
HorizontalOptions="Fill"
189-
Placeholder="Create your own data form" />
190-
<Button x:Name="createButton"
191-
Grid.Column="1" CornerRadius="10"
192-
HeightRequest="35" Text="&#xe784;"
193-
FontSize="Small"
194-
FontFamily="MauiMaterialAssets"
195-
VerticalOptions="Center" HorizontalOptions="Start" />
196-
</Grid>
197-
</VerticalStackLayout>
179+
<VerticalStackLayout Margin="20"
180+
VerticalOptions="Center"
181+
HorizontalOptions="Center">
182+
<Label x:Name="describeLabel"
183+
Text="Create AI-Powered Smart Forms in .NET MAUI for Efficient Productivity."
184+
LineBreakMode="WordWrap"
185+
FontSize="Small"
186+
FontAttributes="Bold" />
187+
<Grid ColumnDefinitions="0.7*,0.3*"
188+
Margin="10"
189+
ColumnSpacing="5">
190+
<Editor x:Name="entry"
191+
AutoSize="TextChanges"
192+
PlaceholderColor="Gray"
193+
VerticalOptions="Center"
194+
HorizontalOptions="Fill"
195+
Placeholder="Create your own data form" />
196+
<Button x:Name="createButton"
197+
Grid.Column="1"
198+
CornerRadius="10"
199+
HeightRequest="35"
200+
Text="&#xe784;"
201+
FontSize="Small"
202+
FontFamily="MauiMaterialAssets"
203+
VerticalOptions="Center"
204+
HorizontalOptions="Start" />
205+
</Grid>
206+
</VerticalStackLayout>
198207

199208
{% endhighlight %}
200209

@@ -219,7 +228,7 @@ xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
219228

220229
{% endtabs %}
221230

222-
#### DataForm - Displaying the Generated Form
231+
#### DataForm - Displaying the Generated Form
223232

224233
The SfDataForm renders the generated form dynamically based on the AI response.
225234

@@ -229,16 +238,16 @@ The SfDataForm renders the generated form dynamically based on the AI response.
229238

230239
xmlns:dataform="clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm"
231240

232-
<dataform:SfDataForm x:Name="dataForm"
233-
Grid.RowSpan="1"
234-
Grid.Row="1" AutoGenerateItems="False"
235-
ValidationMode="PropertyChanged"
236-
LayoutType="TextInputLayout"
237-
HorizontalOptions="Center">
238-
<dataform:SfDataForm.TextInputLayoutSettings>
239-
<dataform:TextInputLayoutSettings ShowHelperText="True"/>
240-
</dataform:SfDataForm.TextInputLayoutSettings>
241-
</dataform:SfDataForm>
241+
<dataform:SfDataForm x:Name="dataForm"
242+
Grid.RowSpan="1"
243+
Grid.Row="1" AutoGenerateItems="False"
244+
ValidationMode="PropertyChanged"
245+
LayoutType="TextInputLayout"
246+
HorizontalOptions="Center">
247+
<dataform:SfDataForm.TextInputLayoutSettings>
248+
<dataform:TextInputLayoutSettings ShowHelperText="True"/>
249+
</dataform:SfDataForm.TextInputLayoutSettings>
250+
</dataform:SfDataForm>
242251

243252
{% endhighlight %}
244253

@@ -252,15 +261,21 @@ The SfAIAssistView offers contextual help, such as real-time suggestions or chat
252261

253262
{% highlight xaml %}
254263

255-
<aiassistview:SfAIAssistView x:Name="aiAssistView"
256-
Grid.Row="1" HorizontalOptions="Fill"
257-
ShowHeader="False"
258-
AssistItems="{Binding Messages}">
259-
<aiassistview:SfAIAssistView.Behaviors>
260-
<local:DataFormAssistViewBehavior x:Name="dataFormAssistViewModel" AIActionButton="{x:Reference aiActionButton}" RefreshButton="{x:Reference refreshButton}" CloseButton="{x:Reference close}"
261-
DataFormNameLabel="{x:Reference dataFormNameLabel}" BusyIndicator="{x:Reference busyIndicator}" DataForm="{x:Reference dataForm}" DataFormGeneratorModel="{x:Reference dataFormGeneratorModel}" Entry="{x:Reference entry}" CreateButton="{x:Reference createButton}"/>
262-
</aiassistview:SfAIAssistView.Behaviors>
263-
</aiassistview:SfAIAssistView>
264+
<aiassistview:SfAIAssistView x:Name="aiAssistView"
265+
Grid.Row="1" HorizontalOptions="Fill"
266+
ShowHeader="False"
267+
AssistItems="{Binding Messages}">
268+
<aiassistview:SfAIAssistView.Behaviors>
269+
<local:DataFormAssistViewBehavior x:Name="dataFormAssistViewModel" AIActionButton="{x:Reference aiActionButton}"
270+
RefreshButton="{x:Reference refreshButton}"
271+
CloseButton="{x:Reference close}"
272+
DataFormNameLabel="{x:Reference dataFormNameLabel}"
273+
BusyIndicator="{x:Reference busyIndicator}"
274+
DataForm="{x:Reference dataForm}"
275+
DataFormGeneratorModel="{x:Reference dataFormGeneratorModel}" Entry="{x:Reference entry}"
276+
CreateButton="{x:Reference createButton}"/>
277+
</aiassistview:SfAIAssistView.Behaviors>
278+
</aiassistview:SfAIAssistView>
264279

265280
{% endhighlight %}
266281

MAUI/DataForm/AI-Powered-Smart-Paste-DataForm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This guide introduces the integration of AI-powered Smart Paste functionality in
2222

2323
### Step 2: Set up Azure OpenAI
2424

25-
To enable AI functionality in your .NET MAUI Scheduler, first ensure that you have access to [Azure OpenAI](https://azure.microsoft.com/en-in/products/ai-services/openai-service). In the Azure portal, create an Azure OpenAI resource and deploy a model such as GPT-35. Assign a deployment name (for example, GPT35Turbo) that you’ll reference in your application code. Finally, copy the API key and endpoint URL from the resource settings, as these are required for authentication and communication with the OpenAI service.
25+
To enable AI functionality in your .NET MAUI DataForm, first ensure that you have access to [Azure OpenAI](https://azure.microsoft.com/en-in/products/ai-services/openai-service). In the Azure portal, create an Azure OpenAI resource and deploy a model such as GPT-35. Assign a deployment name (for example, GPT35Turbo) that you’ll reference in your application code. Finally, copy the API key and endpoint URL from the resource settings, as these are required for authentication and communication with the OpenAI service.
2626

2727
### Step 3: Connect to the Azure OpenAI
2828

@@ -220,7 +220,7 @@ Create a view model containing an instance of the model. Assign this instance to
220220

221221
### Step 3: Design the UI
222222

223-
In XAML, set up the form layout - including labels, images, dataform control. Add a smart paste button that triggers that triggers the AI functionality and a submit button for data validation.
223+
In XAML, set up the form layout - including labels, images, dataform control. Add a smart paste button that triggers the AI functionality and a submit button for data validation.
224224

225225
{% tabs %}
226226

0 commit comments

Comments
 (0)