Skip to content

This repository contains a sample on How to get dropped resource in the Syncfusion Xamarin.Forms Schedule (SfSchedule)?

Notifications You must be signed in to change notification settings

SyncfusionExamples/drag-and-drop-resource-schedule-xamarin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

How to get dropped resource in Xamarin.Forms Schedule (SfSchedule)?

You can get the dropped resource of SfSchedule in Xamarin.Forms using DropResourceItem in the AppointmentDrop event.

XAML

<syncfusion:SfSchedule
                x:Name="schedule"
                AllowAppointmentDrag="true"
                ScheduleView="TimelineView" 
                DataSource="{Binding Events}"
                ScheduleResources="{Binding Employees}"
                SelectedResources="{Binding SelectedEmployees}"
                ShowResourceView="True"
                ResourceViewMode="Absolute"/>

C#

public class SchedulerPageBehavior : Behavior<ContentPage>
{
    SfSchedule schedule;

    private void WireEvents()
    {
        this.schedule.AppointmentDrop += Schedule_AppointmentDrop;
    }

    private void Schedule_AppointmentDrop(object sender, AppointmentDropEventArgs e)
    {
        var changedResource = e.DropResourceItem;
        App.Current.MainPage.DisplayAlert("", "Resorce change into " + (changedResource as Employee).Name, "ok");
    }

    private void UnWireEvents()
    {
        this.schedule.AppointmentDrop -= Schedule_AppointmentDrop;
    }
}

About

This repository contains a sample on How to get dropped resource in the Syncfusion Xamarin.Forms Schedule (SfSchedule)?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages