Hi
Frederick,
#Regarding
Update the events inside the SelectionChanged event
Your
requirement can be achieved with the help of SelectionChanged event in the
Scheduler. Inside the event, you can reset or update the events as per your requirement.
Please refer to the following code snippet for your reference.
Code
Snippet
<ContentPage.BindingContext>
<local:BusinessObjectViewModel x:Name="viewmodel"/>
</ContentPage.BindingContext>
<Grid>
<scheduler:SfScheduler x:Name="Scheduler"
View="Week"
AppointmentsSource="{Binding Events}"
FirstDayOfWeek="Monday"
SelectedCellBackground="Orange"
SelectionChanged="Scheduler_SelectionChanged"
ShowWeekNumber="True"
AllowedViews="Day,Week,WorkWeek,Agenda,Month,TimelineDay,TimelineWeek,TimelineWorkWeek,TimelineMonth">
</scheduler:SfScheduler>
</Grid>
|
Inside
the SelectionChanged event
void
Scheduler_SelectionChanged(System.Object sender, SchedulerSelectionChangedEventArgs
e)
{
viewmodel.Events = new
ObservableCollection<SchedulerAppointment>
{
new
SchedulerAppointment
{
StartTime = DateTime.Now,
EndTime = DateTime.Now.AddHours(2),
Subject="Test
Subject"
}
};
}
|
Please
refer to the demo sample in the following locations.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SchedulerMAUI-21975030981
Please
let us know if you have any concerns.
Regards,
SaiGanesh Sakthivel