public Chart()
{
// Designer values
InitializeComponent();
// Factory values
HeaderOneHeight = 32;
HeaderTwoHeight = 20;
BarSpacing = 26;
BarHeight = 20;
BarWidth = 20;
this.DoubleBuffered = true;
var viewport = new ControlViewport(this);
viewport.WheelDelta = BarSpacing;
_mViewport = viewport;
TimeScaleDisplay = GanttChart.TimeScaleDisplay.DayOfWeek;
AllowTaskDragDrop = true;
ShowRelations = true;
ShowSlack = false;
AccumulateRelationsOnGroup = false;
ShowTaskLabels = true;
this.Dock = DockStyle.Fill;
this.Margin = new Padding(0, 0, 0, 0);
this.Padding = new Padding(0, 0, 0, 0);
// Formatting
TaskFormat = new GanttChart.TaskFormat() {
Color = Brushes.Black,
Border = Pens.Maroon,
BackFill = Brushes.MediumSlateBlue,
ForeFill = Brushes.YellowGreen,
SlackFill = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.LightDownwardDiagonal, Color.Blue, Color.Transparent)
};
CriticalTaskFormat = new GanttChart.TaskFormat() {
Color = Brushes.Black,
Border = Pens.Maroon,
BackFill = Brushes.Crimson,
ForeFill = Brushes.YellowGreen,
SlackFill = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.LightDownwardDiagonal, Color.Red, Color.Transparent)
};
HeaderFormat = new GanttChart.HeaderFormat() {
Color = Brushes.Black,
Border = new Pen(SystemColors.ActiveBorder),
GradientLight = SystemColors.ButtonHighlight,
GradientDark = SystemColors.ButtonFace
};
}