[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
   [Expand]Product Information
    Getting Started
   [Expand]Scheduler Elements and Structure
   [Expand]Data Binding
   [Expand]Import and Export
   [Expand]Time Zones
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
   [Expand]Member Tables
   [Collapse]Visual Elements
    [Collapse]Scheduler Control
      All-Day Area
      Appointment Flyout
      Date Navigation Bar
      Day Headers
      Day of Week Headers
      Group Separator
      More Buttons
      Navigation Buttons
      Resource Headers
      Resource Navigator
      Status Lines
      Time Cells
      Time Ruler
      Time Indicator
      Time Scales
      Selection Bar
      Scroll More Buttons
    [Expand]Command UI
     Resources Tree
     Date Navigator
     Auxiliary Controls
     Reporting Controls
     Pop-up Menus
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


This topic describes the visual AppointmentDependency element, and lists several properties that affect its visual appearance.

The Gantt View can show relationships between tasks (appointments). These relationships are called task (appointment) dependencies. They indicate dependency criteria based on which tasks begin and end in relation to each other. For example, the Finish-to-Start dependency means that the second task may not start before the first task is finished.

Appointment dependency is graphically depicted as a line with an arrow at one end, drawn between appointments on the Scheduler surface. The appointment at the head of the arrow is the dependent appointment, and the appointment at the tail of the arrow is the parent appointment.

You can create a dependency using the appointment context menu. Right-click an appointment, select Create Dependency, and drag the line to the dependent appointment.

To change the dependency type, double-click the dependency line. The SchedulerControl.EditAppointmentDependencyFormShowing event occurs and the AppointmentDependencyForm dialog is invoked. The dialog enables you to specify the AppointmentDependencyType.

To specify the visual appearance of dependencies in the view, use the corresponding SchedulerControl.GanttView.Appearance.Dependency and SchedulerControl.GanttView.Appearance.SelectedDependency settings. To learn more about appearances, refer to the Appearances document.

You can draw individual dependencies manually by handling the SchedulerControl.CustomDrawDependency event.

A dependency is an AppointmentDependency object contained within the AppointmentDependencyStorage.


To support dependencies, the Scheduler should work in bound mode with the proper data mappings.

The AppointmentDependencyMappingInfo and AppointmentDependencyCustomFieldMappingCollection specify how data source fields are mapped to dependency properties. In the Visual Studio designer, you can utilize the Mapping Wizard to specify mappings.

The currently selected dependencies are available via the SchedulerControl.SelectedDependencies property.

Use the SchedulerHitTest.AppointmentDependency value to check for the dependency element in the hit test (using the SchedulerViewInfoBase.CalcHitInfo method).

The SchedulerStorageBase.AppointmentDependencyInserting, SchedulerStorageBase.AppointmentDependencyDeleting, SchedulerStorageBase.AppointmentDependenciesInserted, SchedulerStorageBase.AppointmentDependenciesChanged, and SchedulerStorageBase.AppointmentDependenciesDeleted events enable you to control dependency modifications.

By default, dependencies do not impose restrictions on appointment start and finish values. You can enable constraints manually by handling the SchedulerControl.AllowAppointmentConflicts event.

Expanded See Also

Is this topic helpful?​​​​​​​