Skip to content

Commit 500a6c4

Browse files
committed
Added events and styles md files
1 parent 30d0aa7 commit 500a6c4

File tree

3 files changed

+102
-3
lines changed

3 files changed

+102
-3
lines changed

MAUI/SmartScheduler/events.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
layout: post
3+
title: Events .NET MAUI Smart Scheduler control | Syncfusion
4+
description: Learn here all about Events support in Syncfusion<sup>&reg;</sup> .NET MAUI Smart Scheduler(SfSmartScheduler) control.
5+
platform: MAUI
6+
control: SfSmartScheduler
7+
documentation: ug
8+
---
9+
10+
# Events in .NET MAUI Smart Scheduler (SfSmartScheduler)
11+
12+
The `SfSmartScheduler` supports the `AssistAppointmentResponseCompleted` event to interact with .NET MAUI Smart Scheduler.
13+
14+
## AssistAppointmentResponseCompleted Event
15+
16+
The `SfSmartScheduler` control provides the `AssistAppointmentResponseCompleted` to respond an appointment is created or modified through AI assistance. The appointment, assistant response, handled and its action are passed through the `AssistAppointmentResponseCompletedEventArgs`. This argument provides the following details:
17+
18+
* [Appointment](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerAppointment.html) : The appointment details.
19+
* `Handled` : The value indicates whether the event is handled or not.
20+
* `AssistantResponse` : The appointment response detail.
21+
* `Action` : The action whether the appointment is added, edited or deleted.
22+
23+
The following example demonstrates how to handle the `AssistAppointmentResponseCompleted` event.
24+
25+
{% tabs %}
26+
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="2" %}
27+
28+
<smartScheduler:SfSmartScheduler x:Name="smartScheduler" AssistAppointmentResponseCompleted="OnAssistAppointmentResponseCompleted"/>
29+
30+
{% endhighlight %}
31+
{% highlight c# tabtitle="MainPage.xaml.cs" %}
32+
33+
private void OnAssistAppointmentResponseCompleted(object sender, AssistAppointmentResponseCompletedEventArgs e)
34+
{
35+
SchedulerAppointment? appointment = e.Appointment;
36+
string response = e.AssistantResponse;
37+
if (e.Action == AppointmentAction.Add)
38+
{
39+
e.Handled = true;
40+
}
41+
}
42+
43+
{% endhighlight %}
44+
{% endtabs %}

MAUI/SmartScheduler/getting-started.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ namespace GettingStarted
7171
To configure the AI services, you must call the `ConfigureSyncfusionAIServices()` method in the `MauiProgram.cs` file.
7272

7373
{% tabs %}
74-
{% highlight c# hl_lines="6 26" %}
74+
{% highlight C# tabtitle="MauiProgram.cs" hl_lines="1 10" %}
7575
using Microsoft.Maui;
7676
using Microsoft.Maui.Hosting;
7777
using Microsoft.Maui.Controls.Compatibility;
@@ -108,6 +108,7 @@ namespace GettingStarted
108108
}
109109
}
110110
}
111+
111112
{% endhighlight %}
112113
{% endtabs %}
113114

@@ -223,7 +224,7 @@ namespace GettingStarted
223224
To configure the AI services, you must call the `ConfigureSyncfusionAIServices()` method in the `MauiProgram.cs` file.
224225

225226
{% tabs %}
226-
{% highlight c# hl_lines="6 26" %}
227+
{% highlight tabtitle="MauiProgram.cs" c# hl_lines="6 26" %}
227228
using Microsoft.Maui;
228229
using Microsoft.Maui.Hosting;
229230
using Microsoft.Maui.Controls.Compatibility;
@@ -337,12 +338,15 @@ namespace GettingStarted
337338
}
338339
}
339340

341+
{% endhighlight %}
342+
{% endtabs %}
343+
340344
## Step 4: Register the AI Service
341345

342346
To configure the AI services, you must call the `ConfigureSyncfusionAIServices()` method in the `MauiProgram.cs` file.
343347

344348
{% tabs %}
345-
{% highlight c# hl_lines="6 26" %}
349+
{% highlight tabtitle="MauiProgram.cs" c# hl_lines="6 26" %}
346350
using Microsoft.Maui;
347351
using Microsoft.Maui.Hosting;
348352
using Microsoft.Maui.Controls.Compatibility;

MAUI/SmartScheduler/styles.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: post
3+
title: About .NET MAUI Smart Scheduler control | Syncfusion
4+
description: Learn here all about Styles support in Syncfusion<sup>&reg;</sup> .NET MAUI Smart Scheduler(SfSmartScheduler) control.
5+
platform: MAUI
6+
control: SfSmartScheduler
7+
documentation: ug
8+
---
9+
10+
# Styles in .NET MAUI Smart Scheduler (SfSmartScheduler)
11+
12+
You can style the elements of the `.NET MAUI Smart Scheduler` assist view using the `PlaceholderColor`, `AssistViewHeaderTextColor`, `AssistViewHeaderBackground`, `AssistViewHeaderFontSize`,`AssistViewHeaderFontFamily`, `AssistViewHeaderFontAttributes` and `AssistViewHeaderFontAutoScalingEnabled` properties of the `AssistStyle`.
13+
14+
{% tabs %}
15+
{% highlight XAML hl_lines="5 14" %}
16+
17+
<smartScheduler:SfSmartScheduler x:Name="smartScheduler">
18+
<smartScheduler:SfSmartScheduler.AssistViewSettings>
19+
<smartScheduler:SchedulerAssistViewSettings>
20+
<smartScheduler:SchedulerAssistViewSettings.AssistStyle>
21+
<smartScheduler:SmartSchedulerAssistStyle PlaceholderColor="#6750A4"
22+
AssistViewHeaderBackground="#6750A4"
23+
AssistViewHeaderTextColor="#FFFFFF"
24+
AssistViewHeaderFontSize="24"
25+
AssistViewHeaderFontAttributes="Bold"
26+
AssistViewHeaderFontFamily="OpenSansSemibold"
27+
AssistViewHeaderFontAutoScalingEnabled="True"
28+
/>
29+
</smartScheduler:SchedulerAssistViewSettings.AssistStyle>
30+
</smartScheduler:SchedulerAssistViewSettings>
31+
</smartScheduler:SfSmartScheduler.AssistViewSettings>
32+
</smartScheduler:SfSmartScheduler>
33+
34+
{% endhighlight %}
35+
{% highlight C# hl_lines="3" %}
36+
37+
SfSmartScheduler smartScheduler = new SfSmartScheduler();
38+
smartScheduler.AssistViewSettings.AssistStyle = new SmartSchedulerAssistStyle()
39+
{
40+
PlaceholderColor = Color.FromArgb("#6750A4"),
41+
AssistViewHeaderBackground = Color.FromArgb("#6750A4"),
42+
AssistViewHeaderTextColor = Color.FromArgb("#FFFFFF"),
43+
AssistViewHeaderFontSize = 24,
44+
AssistViewHeaderFontAutoScalingEnabled = true,
45+
AssistViewHeaderFontAttributes = FontAttributes.Italic,
46+
AssistViewHeaderFontFamily = "OpenSansSemibold",
47+
};
48+
this.Content = smartScheduler;
49+
50+
{% endhighlight %}
51+
{% endtabs %}

0 commit comments

Comments
 (0)