We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date



I'd like to start off with the current date line showing the loaded time - this I have done successfully by using StickCurrentDateLineTo="LoadedTime" in the XAML.

But then later on I'd like to be able to move the line to a custom position. I can't seem to do this, although I can change the color. 
Is there a way to update StickCurrentDateLineTo after the Gantt has been created and loaded?

This is my code to try to change it:

private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
var currentDate = this.Gantt.CurrentDateLine;
this.Gantt.StickCurrentDateLineTo = CurentDateLinePositions.Absolute;
this.Gantt.CurrentDateLine.Stroke = Brushes.Green;
this.Gantt.CurrentDateLine = new Line()
X1 = currentDate.X1 + 20.0,
X2 = currentDate.X2 + 20.0,
Y1 = currentDate.Y1,
Y2 = currentDate.Y2

3 Replies

FP Farjana Parveen Ayubb Syncfusion Team September 19, 2014 02:57 PM UTC

Hi Steve,


Thank you for contacting Syncfusion Support.


We have analyzed your query. You can achieve your requirement by using Strip lines in GanttControl.


Please refer the following UG link and sample in the following location:


UGLink: http://help.syncfusion.com/ug/wpf/default.htm#!documents/addingstriplinestoap.htm



Farjana Parveen A

Attachment: StripLines_9bf0eefc.zip

ST Steve Teare September 22, 2014 04:52 AM UTC

Thank you, it works using striplines!

FP Farjana Parveen Ayubb Syncfusion Team September 23, 2014 09:55 AM UTC

Hi Steve,


Thank you for the update, Please let us know if you require further assistance.



Farjana Parveen A

Live Chat Icon For mobile
Up arrow icon