wpf-devexpress-dot-xpf-dot-scheduling-dot-sourceobjectcontainer-58533b97.md
Provides access to the data object bound to the current persistent instance.
Namespace : DevExpress.Xpf.Scheduling
Assembly : DevExpress.Xpf.Scheduling.v25.2.dll
NuGet Package : DevExpress.Wpf.Scheduling
public object SourceObject { get; }
Public ReadOnly Property SourceObject As Object
| Type | Description |
|---|---|
| Object |
A Object that is the data source object which is bound to the persistent object.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SourceObject 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#L26
public void ProcessChanges(AppointmentCRUDEventArgs args) {
dbContext.AppointmentEntities.AddRange(args.AddToSource.Select(x => (AppointmentEntity)x.SourceObject));
dbContext.AppointmentEntities.RemoveRange(args.DeleteFromSource.Select(x => (AppointmentEntity)x.SourceObject));
wpf-scheduler-load-data-on-demand/VB/CommonDbContext/ViewModels/SchedulingViewModel.vb#L26
Public Sub ProcessChanges(ByVal args As AppointmentCRUDEventArgs)
dbContext.AppointmentEntities.AddRange(args.AddToSource.Select(Function(x) CType(x.SourceObject, AppointmentEntity)))
dbContext.AppointmentEntities.RemoveRange(args.DeleteFromSource.Select(Function(x) CType(x.SourceObject, AppointmentEntity)))
See Also