From 6c5e3994fe8d4871559b2db09430b79c7e31efdd Mon Sep 17 00:00:00 2001 From: TamilarasanGunasekaran Date: Wed, 12 Jun 2024 10:23:40 +0530 Subject: [PATCH 01/12] WPF 890011 - Gantt flow direction and striplines topics updated --- wpf/Gantt/flow-direction.md | 140 +++++++++++++++++++++- wpf/Gantt/strip-lines.md | 232 +++++++++++++++++++++++++++++------- 2 files changed, 324 insertions(+), 48 deletions(-) diff --git a/wpf/Gantt/flow-direction.md b/wpf/Gantt/flow-direction.md index a1d830a732..746e0d2d85 100644 --- a/wpf/Gantt/flow-direction.md +++ b/wpf/Gantt/flow-direction.md @@ -15,13 +15,149 @@ Gantt provides support to display the contents from right-to-left or left-to-rig {% highlight xaml %} - + + + + + {% endhighlight %} {% highlight c# %} -this.Gantt.FlowDirection = System.Windows.FlowDirection.RightToLeft; +{% highlight c# %} + +//Initializing Gantt + + GanttControl Gantt = new GanttControl(); + ViewModel GanttControlViewModel = new ViewModel(); + TaskAttributeMapping attributes = new TaskAttributeMapping(); + attributes.TaskIdMapping = "TaskId"; + attributes.TaskNameMapping = "TaskName"; + attributes.StartDateMapping = "StartDate"; + attributes.FinishDateMapping = "FinishDate"; + attributes.DurationMapping = "Duration"; + attributes.PredecessorMapping = "Predecessor"; + attributes.ProgressMapping = "Progress"; + attributes.ResourceInfoMapping = "Resources"; + attributes.ChildMapping = "Child"; + this.Gantt.DataContext = GanttControlViewModel; + Gantt.TaskAttributeMapping = attributes; + Gantt.FlowDirection = System.Windows.FlowDirection.RightToLeft; + Gantt.ItemsSource = GanttControlViewModel.TaskCollection; + + public class GanttControlViewModel + { + /// + /// Holds the task collections. + /// + private ObservableCollection _taskCollections; + + /// + /// Initializes a new instance of the class. + /// + public GanttControlViewModel() + { + _taskCollections = GetData(); + } + + /// + /// Gets or sets the appointment item source. + /// + /// The appointment item source. + public ObservableCollection TaskCollection + { + get + { + return _taskCollections; + } + set + { + _taskCollections = value; + } + } + + /// + /// Gets the data. + /// + /// + public ObservableCollection GetData() + { + var data = new ObservableCollection(); + data.Add(new TaskDetails() { TaskId = 1, TaskName = "Analysis/Planning", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + data[0].Child.Add((new TaskDetails() { TaskId = 2, TaskName = "Identify Components to be Localized", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[0].Child.Add((new TaskDetails() { TaskId = 3, TaskName = "Ensure file localizability", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[0].Child.Add((new TaskDetails() { TaskId = 4, TaskName = "Identify tools", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[0].Child.Add((new TaskDetails() { TaskId = 5, TaskName = "Test tools", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 8, 1), Progress = 10d })); + data[0].Child.Add((new TaskDetails() { TaskId = 6, TaskName = "Develop delivery timeline", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 8, 1), Progress = 10d })); + data[0].Child.Add((new TaskDetails() { TaskId = 7, TaskName = "Analysis Complete", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 8, 10), Progress = 10d })); + + data.Add(new TaskDetails() { TaskId = 8, TaskName = "Production", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + data[1].Child.Add((new TaskDetails() { TaskId = 9, TaskName = "Software Components", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[1].Child.Add((new TaskDetails() { TaskId = 10, TaskName = "Localization Component - User Interface", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[1].Child.Add((new TaskDetails() { TaskId = 11, TaskName = "User Assistance Components", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[1].Child.Add((new TaskDetails() { TaskId = 12, TaskName = "Software components complete", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + + + data.Add(new TaskDetails() { TaskId = 13, TaskName = "Quality Assurance", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 12), Progress = 40d, }); + data[2].Child.Add((new TaskDetails() { TaskId = 14, TaskName = "Review project information", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 15), Progress = 20d })); + data[2].Child.Add((new TaskDetails() { TaskId = 15, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 8), Progress = 20d })); + data[2].Child.Add((new TaskDetails() { TaskId = 16, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[2].Child.Add((new TaskDetails() { TaskId = 17, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 18), Progress = 10d })); + + data.Add(new TaskDetails() { TaskId = 18, TaskName = "Beta Testing", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + data[3].Child.Add((new TaskDetails() { TaskId = 19, TaskName = "Disseminate completed product", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[3].Child.Add((new TaskDetails() { TaskId = 20, TaskName = "Obtain feedback", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[3].Child.Add((new TaskDetails() { TaskId = 21, TaskName = "Modify", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + data[3].Child.Add((new TaskDetails() { TaskId = 22, TaskName = "Test", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + data[3].Child.Add((new TaskDetails() { TaskId = 23, TaskName = "Complete", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + + data.Add(new TaskDetails() { TaskId = 24, TaskName = "Post-Project Review", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 18), Progress = 40d, }); + data[4].Child.Add((new TaskDetails() { TaskId = 25, TaskName = "Finalize cost analysis", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[4].Child.Add((new TaskDetails() { TaskId = 26, TaskName = "Analyze performance", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[4].Child.Add((new TaskDetails() { TaskId = 27, TaskName = "Archive files", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[4].Child.Add((new TaskDetails() { TaskId = 28, TaskName = "Document lessons learned", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 18), Progress = 10d })); + data[4].Child.Add((new TaskDetails() { TaskId = 29, TaskName = "Distribute to team members", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[4].Child.Add((new TaskDetails() { TaskId = 30, TaskName = "Post-project review complete", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + + data[0].Resources = new ObservableCollection() { new Resource { ID = 1, Name = "John" }, new Resource { ID = 2, Name = "Neil" } }; + data[0].Child[3].Resources = new ObservableCollection() { new Resource() { ID = 3, Name = "Peter" } }; + data[1].Resources = new ObservableCollection() { new Resource() { ID = 4, Name = "David" } }; + + data[0].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 2, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[0].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[0].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + data[1].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 9, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[1].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 10, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[1].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 7, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + data[2].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + data[2].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + data[2].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + + data[3].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[3].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[3].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 19, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + data[4].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 25, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[4].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 28, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[4].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 30, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[4].Child[4].Predecessor.Add(new Predecessor() { GanttTaskIndex = 27, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + return data; + + } +} {% endhighlight %} diff --git a/wpf/Gantt/strip-lines.md b/wpf/Gantt/strip-lines.md index 5711624832..06e63c446e 100644 --- a/wpf/Gantt/strip-lines.md +++ b/wpf/Gantt/strip-lines.md @@ -229,49 +229,17 @@ Event #### Regular strip lines -The following code sample demonstrates how to define a collection of regular strip lines. - -{% highlight c# %} - - -StripCollection = new List(); - -//Getting the collection of StripLineInfo -StripCollection = GetStripCollection(); - -//Method will return the collection StripLineInfo -private List GetStripCollection() - -{ - List stripCollection = new List(); - stripCollection.Add(new StripLineInfo() - { - Content = "Weekly Team Meeting", - StartDate = new DateTime(2012, 6, 4), - EndDate = new DateTime(2012, 6, 4), - HorizontalContentAlignment = HorizontalAlignment.Center, - VerticalContentAlignment = VerticalAlignment.Center, - Background = Brushes.Gold, RepeatBehavior = Repeat.Week, RepeatFor = 1, - RepeatUpto = new DateTime(2012, 12, 10), - }); - - return stripCollection; -} - - -{% endhighlight %} - The following code sample demonstrates how to bind the regular strip line collection to strip lines. +{% tabs %} {% highlight xaml %} - - - - + - - + + {% endhighlight %} +{% highlight c# %} + +//Initializing Gantt + GanttControl Gantt = new GanttControl(); + ViewModel GanttControlViewModel = new ViewModel(); + TaskAttributeMapping attributes = new TaskAttributeMapping(); + attributes.TaskIdMapping = "TaskId"; + attributes.TaskNameMapping = "TaskName"; + attributes.StartDateMapping = "StartDate"; + attributes.FinishDateMapping = "FinishDate"; + attributes.DurationMapping = "Duration"; + attributes.PredecessorMapping = "Predecessor"; + attributes.ProgressMapping = "Progress"; + attributes.ResourceInfoMapping = "Resources"; + attributes.ChildMapping = "Child"; + this.Gantt.DataContext = GanttControlViewModel; + Gantt.TaskAttributeMapping = attributes; + Gantt.ShowStripLines = true; + Gantt.ItemsSource = GanttControlViewModel.TaskCollection; + Gantt.Striplines = GanttControlViewModel.StripCollection; + + public class GanttControlViewModel + { + /// + /// Holds the task collections. + /// + private ObservableCollection _taskCollections; + + /// + /// Holds the strip collection + /// + private List _stripCollection; + + /// + /// Initializes a new instance of the class. + /// + public GanttControlViewModel() + { + _taskCollections = GetData(); + _stripCollection = GetStripCollection(); + } + + /// + /// Gets or sets the strip collection. + /// + /// The strip collection. + public List StripCollection + { + get + { + return _stripCollection; + } + set + { + _stripCollection = value; + //RaisePropertyChanged("StripCollection"); + } + } + + /// + /// Gets or sets the appointment item source. + /// + /// The appointment item source. + public ObservableCollection TaskCollection + { + get + { + return _taskCollections; + } + set + { + _taskCollections = value; + } + } + + /// + /// Gets the strip collection + /// + /// + private List GetStripCollection() + { + List stripCollection = new List(); + stripCollection.Add(new StripLineInfo() + { + Content = "Weekly Team Meeting", + StartDate = new DateTime(2011, 7, 3), + EndDate = new DateTime(2011, 7, 4), + HorizontalContentAlignment = HorizontalAlignment.Center, + VerticalContentAlignment = VerticalAlignment.Center, + Background = Brushes.Green, + RepeatBehavior = Repeat.Week, + RepeatFor = 1, + RepeatUpto = new DateTime(2011, 12, 10), + }); + + return stripCollection; + } + + /// + /// Gets the data. + /// + /// + public ObservableCollection GetData() + { + var data = new ObservableCollection(); + data.Add(new TaskDetails() { TaskId = 1, TaskName = "Analysis/Planning", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + data[0].Child.Add((new TaskDetails() { TaskId = 2, TaskName = "Identify Components to be Localized", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[0].Child.Add((new TaskDetails() { TaskId = 3, TaskName = "Ensure file localizability", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[0].Child.Add((new TaskDetails() { TaskId = 4, TaskName = "Identify tools", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[0].Child.Add((new TaskDetails() { TaskId = 5, TaskName = "Test tools", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 8, 1), Progress = 10d })); + data[0].Child.Add((new TaskDetails() { TaskId = 6, TaskName = "Develop delivery timeline", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 8, 1), Progress = 10d })); + data[0].Child.Add((new TaskDetails() { TaskId = 7, TaskName = "Analysis Complete", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 8, 10), Progress = 10d })); + + data.Add(new TaskDetails() { TaskId = 8, TaskName = "Production", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + data[1].Child.Add((new TaskDetails() { TaskId = 9, TaskName = "Software Components", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[1].Child.Add((new TaskDetails() { TaskId = 10, TaskName = "Localization Component - User Interface", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[1].Child.Add((new TaskDetails() { TaskId = 11, TaskName = "User Assistance Components", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[1].Child.Add((new TaskDetails() { TaskId = 12, TaskName = "Software components complete", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + + + data.Add(new TaskDetails() { TaskId = 13, TaskName = "Quality Assurance", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 12), Progress = 40d, }); + data[2].Child.Add((new TaskDetails() { TaskId = 14, TaskName = "Review project information", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 15), Progress = 20d })); + data[2].Child.Add((new TaskDetails() { TaskId = 15, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 8), Progress = 20d })); + data[2].Child.Add((new TaskDetails() { TaskId = 16, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[2].Child.Add((new TaskDetails() { TaskId = 17, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 18), Progress = 10d })); + + data.Add(new TaskDetails() { TaskId = 18, TaskName = "Beta Testing", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + data[3].Child.Add((new TaskDetails() { TaskId = 19, TaskName = "Disseminate completed product", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[3].Child.Add((new TaskDetails() { TaskId = 20, TaskName = "Obtain feedback", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[3].Child.Add((new TaskDetails() { TaskId = 21, TaskName = "Modify", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + data[3].Child.Add((new TaskDetails() { TaskId = 22, TaskName = "Test", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + data[3].Child.Add((new TaskDetails() { TaskId = 23, TaskName = "Complete", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + + data.Add(new TaskDetails() { TaskId = 24, TaskName = "Post-Project Review", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 18), Progress = 40d, }); + data[4].Child.Add((new TaskDetails() { TaskId = 25, TaskName = "Finalize cost analysis", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + data[4].Child.Add((new TaskDetails() { TaskId = 26, TaskName = "Analyze performance", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + data[4].Child.Add((new TaskDetails() { TaskId = 27, TaskName = "Archive files", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[4].Child.Add((new TaskDetails() { TaskId = 28, TaskName = "Document lessons learned", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 18), Progress = 10d })); + data[4].Child.Add((new TaskDetails() { TaskId = 29, TaskName = "Distribute to team members", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + data[4].Child.Add((new TaskDetails() { TaskId = 30, TaskName = "Post-project review complete", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + + data[0].Resources = new ObservableCollection() { new Resource { ID = 1, Name = "John" }, new Resource { ID = 2, Name = "Neil" } }; + data[0].Child[3].Resources = new ObservableCollection() { new Resource() { ID = 3, Name = "Peter" } }; + data[1].Resources = new ObservableCollection() { new Resource() { ID = 4, Name = "David" } }; + + data[0].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 2, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[0].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[0].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + data[1].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 9, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[1].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 10, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[1].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 7, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + data[2].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + data[2].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + data[2].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + + data[3].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[3].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[3].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 19, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + data[4].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 25, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[4].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 28, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[4].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 30, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + data[4].Child[4].Predecessor.Add(new Predecessor() { GanttTaskIndex = 27, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + return data; + + } +} + +{% endhighlight %} +{% endtabs %} + #### Output The following screenshot illustrates how to render the regular strip lines. @@ -330,13 +471,12 @@ The following code sample demonstrates how to bind the absolute strip line colle {% highlight xaml %} - - - - + - - + + {% endhighlight %} From 63b00ac531168df77d00f90bfcb356a15f1f2a8b Mon Sep 17 00:00:00 2001 From: TamilarasanGunasekaran Date: Thu, 13 Jun 2024 11:55:35 +0530 Subject: [PATCH 02/12] changes updated --- wpf/Gantt/import-and-export-support.md | 162 ++++++++++++++++++-- wpf/Gantt/zooming.md | 198 +++++++++++++++++++++---- 2 files changed, 321 insertions(+), 39 deletions(-) diff --git a/wpf/Gantt/import-and-export-support.md b/wpf/Gantt/import-and-export-support.md index bed85da346..bd889232ec 100644 --- a/wpf/Gantt/import-and-export-support.md +++ b/wpf/Gantt/import-and-export-support.md @@ -69,19 +69,39 @@ The following code illustrates how to Import and Export Task Details from or to {% tabs %} {% highlight xaml %} - - - -