![]() |
|
GTP.NET.Silverlight and WPF FAQ 11431Is there any way to show a background line between the days Please note that this article
refers to GTP.NET.SL and WPF Jump to article- 2009-04-09 11:14:00 - Email plexityHide Question
Is there any way to show a background line between the days? Maybe even hours/minutes depending on scale?
Answer You can do things like that by using the events, this code draws a line each day: void gantt1_OnDrawBackground(object sender, GanttUserDrawArgs e) { e.Canvas.Children.Clear(); DateTime aDate=gantt10.DateScaler.StartTime; aDate=aDate.Date; // only keep date part while (aDate<gantt10.DateScaler.StopTime) { Line line = new Line(); e.Canvas.Children.Add(line); line.X1 = gantt10.DateScaler.TimeToPixel(aDate); line.X2 = line.X1; line.Y1 = 0; line.Y2 = gantt10.ActualHeight; line.Stroke = new SolidColorBrush(Colors.Black); line.StrokeThickness = 1; aDate=aDate.AddDays(1); } }
|
"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%" |
| (C) 2010 PlexityHide.com Grastensvagen 24, S-163 45 Spanga Sweden E-mail: support@plexityhide.com |