Showing and/or customizing current time or other vertical bars on certain time intervals in Gantt Chart Library or Project Management Library

How can I customize the appearance of the current time vertical bar or highlight specific time intervals using vertical bar providers in Gantt Chart and relarted controls within Gantt Chart Library or Project Management Library?

You can show vertical bars to highlight certain moments or time intervals in the chart area using a customized VerticalBarProviders collection set up for the control; the example below simply defines a custom vertical bar displaying a red vertical bar for the current time:

GanttChartView.VerticalBarProviders.Clear();
GanttChartView.VerticalBarProviders.Add(
    new GanttChartViewVerticalBarProvider(
        new VerticalBarSeparatorProvider(
            delegate(DateTime start, DateTime finish) {
                var now = DateTime.Now;
                if (now < start || now > finish)
                    return null;
                var customBrush = Brushes.Red;
                var bars = new SortedList<DateTime, VerticalBar>();
                bars.Add(now, new VerticalBar(null, customBrush, new Thickness(0, 0, 1, 0)));
                return bars;
            }
        )
    )
);