[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Collapse]Gantt Control
   [Expand]Getting Started
   [Expand]Bind to Data
   [Expand]Data Editing and Validation
    Item Types
    Task Dependencies
    Working and Non-Working Time Ranges
    Strip Lines
   [Expand]Visual Elements
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Strip Lines

The GanttControl (see GanttControl) allows you to highlight individual points or ranges on the timeline.

The control supports three strip line types:

  • StripLine - a single strip line defined by a start date and duration.

  • StripLineRule - a set of strip lines defined by a Recurrence pattern.

  • CurrentDateTimeStripLine - a strip line that indicates the current time (DateTime.Now), and automatically updates its position onscreen.

Expanded Add Strip Lines

Add Strip Lines in Markup

Use the GanttView.StripLines property to populate a collection of strip lines displayed within the Gantt area.

Bind to a Collection of Strip Lines

To describe strip lines in a Model or ViewModel, create a corresponding class with strip line settings.

In the ViewModel, create the StripLines collection.

This collection should implement the System.Collections.Specialized.INotifyCollectionChanged interface, so that the changes made within the ViewModel are automatically reflected by the GanttControl. The GanttView.StripLinesSource property should be bound to the ViewModel's StripLines property.

Strip lines are generated according to a template specified by the GanttView.StripLineTemplate property.

A template that describes strip lines should be assigned to the GanttView.StripLineTemplate property.

Expanded Appearance Customization

Use the following properties to customize strip line appearance.

Property Description
StripLineBase.Background Specifies the strip line color.
StripLineBase.BorderBrush Specifies the strip line outer border brush.
StripLineBase.BorderThickness Specifies the strip line outer border thickness.

The code sample below demonstrates how to change a strip line's background color and border.

The StripLineBase.ControlStyle property allows you to customize the StripLineControl style. This control is used to render strip lines.

The code sample below demonstrates how to change strip line opacity when an end user moves the cursor over it.

Expanded Link Strip Line Visibility to Zoom Factor

The control allows you to hide strip lines if end-users zoom out the view farther than specified by the StripLineBase.HideOnZoom property.

The code sample below demonstrates a strip line that is hidden when the Gantt area's GanttView.Zoom property value is less than one hour per device-independent pixel.

Note

The StripLineBase.HideOnZoom property does not affect the CurrentDateTimeStripLine.

Expanded Strip Line Tooltip

Use the strip line's StripLineBase.ToolTipTemplate property to define the strip line tooltip template.

The template data context is represented by the StripLineToolTipData object.

The code sample below demonstrates how to specify a tooltip template for a strip line.

Set the GanttView.StripLineShowToolTipDelay property to the desired delay in milliseconds to display tooltips with a custom delay.

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