Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions MAUI/SmartScheduler/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: post
title: Events .NET MAUI Smart Scheduler control | Syncfusion
description: Learn here all about Events support in Syncfusion<sup>&reg;</sup> .NET MAUI Smart Scheduler(SfSmartScheduler) control.
platform: MAUI
control: SfSmartScheduler
documentation: ug
---

# Events in .NET MAUI Smart Scheduler (SfSmartScheduler)

The `SfSmartScheduler` supports the `AssistAppointmentResponseCompleted` event to interact with .NET MAUI Smart Scheduler.

## AssistAppointmentResponseCompleted Event

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:

* [Appointment](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerAppointment.html) : The appointment details.
* `Handled` : The value indicates whether the event is handled or not.
* `AssistantResponse` : The appointment response detail.
* `Action` : The action whether the appointment is added, edited or deleted.

The following example demonstrates how to handle the `AssistAppointmentResponseCompleted` event.

{% tabs %}
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="2" %}

<smartScheduler:SfSmartScheduler x:Name="smartScheduler" AssistAppointmentResponseCompleted="OnAssistAppointmentResponseCompleted"/>

{% endhighlight %}
{% highlight c# tabtitle="MainPage.xaml.cs" %}

private void OnAssistAppointmentResponseCompleted(object sender, AssistAppointmentResponseCompletedEventArgs e)
{
SchedulerAppointment? appointment = e.Appointment;
string response = e.AssistantResponse;
if (e.Action == AppointmentAction.Add)
{
e.Handled = true;
}
}

{% endhighlight %}
{% endtabs %}
Loading