Back to Devexpress

CreateSourceObjectEventArgs.ItemType Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-createsourceobjecteventargs-de62f48e.md

latest3.4 KB
Original Source

CreateSourceObjectEventArgs.ItemType Property

Returns the type of the created source object.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public ItemType ItemType { get; }
vb
Public ReadOnly Property ItemType As ItemType

Property Value

TypeDescription
ItemType

A DevExpress.Xpf.Scheduling.ItemType enumeration value.

|

Available values:

NameDescription
AppointmentItem

The event is raised for the AppointmentItem object or the AppointmentItemCollection.

| | ResourceItem |

The event is raised for the ResourceItem object or ResourceItemCollection.

| | LabelItem |

The event is raised for the AppointmentLabelItem object or the AppointmentLabelItemCollection.

| | StatusItem |

The event is raised for the AppointmentStatusItem object or the AppointmentStatusItemCollection.

| | TimeRegionItem | |

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ItemType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-scheduler-load-data-on-demand/CS/CommonDbContext/ViewModels/SchedulingViewModel.cs#L17

csharp
public void CreateSourceObject(CreateSourceObjectEventArgs args) {
    if(args.ItemType == ItemType.AppointmentItem)
        args.Instance = new AppointmentEntity();

wpf-scheduler-load-data-on-demand/VB/CommonDbContext/ViewModels/SchedulingViewModel.vb#L17

vb
Public Sub CreateSourceObject(ByVal args As CreateSourceObjectEventArgs)
    If args.ItemType = ItemType.AppointmentItem Then
        args.Instance = New AppointmentEntity()

See Also

CreateSourceObjectEventArgs Class

CreateSourceObjectEventArgs Members

DevExpress.Xpf.Scheduling Namespace