diff --git a/wpf/Gantt/Custom-Node-Style_images/Custom-Node-Style_img1.png b/wpf/Gantt/Custom-Node-Style_images/Custom-Node-Style_img1.png deleted file mode 100644 index 8ad4767720..0000000000 Binary files a/wpf/Gantt/Custom-Node-Style_images/Custom-Node-Style_img1.png and /dev/null differ diff --git a/wpf/Gantt/Custom-Node-Style_images/Custom-Node-Style_img2.png b/wpf/Gantt/Custom-Node-Style_images/Custom-Node-Style_img2.png deleted file mode 100644 index 99bd943d99..0000000000 Binary files a/wpf/Gantt/Custom-Node-Style_images/Custom-Node-Style_img2.png and /dev/null differ diff --git a/wpf/Gantt/Custom-Node-Style_images/gantt-custom-node-style-with-gradient.png b/wpf/Gantt/Custom-Node-Style_images/gantt-custom-node-style-with-gradient.png new file mode 100644 index 0000000000..eb8f581732 Binary files /dev/null and b/wpf/Gantt/Custom-Node-Style_images/gantt-custom-node-style-with-gradient.png differ diff --git a/wpf/Gantt/Custom-Node-Style_images/gantt-custom-node-style.png b/wpf/Gantt/Custom-Node-Style_images/gantt-custom-node-style.png new file mode 100644 index 0000000000..4337836d9b Binary files /dev/null and b/wpf/Gantt/Custom-Node-Style_images/gantt-custom-node-style.png differ diff --git a/wpf/Gantt/DateTime-Indicator-Customization_images/DateTime-Indicator-Customization_img1.png b/wpf/Gantt/DateTime-Indicator-Customization_images/DateTime-Indicator-Customization_img1.png deleted file mode 100644 index 3e453bce68..0000000000 Binary files a/wpf/Gantt/DateTime-Indicator-Customization_images/DateTime-Indicator-Customization_img1.png and /dev/null differ diff --git a/wpf/Gantt/DateTime-Indicator-Customization_images/gantt-control-datetime-indicator-customization.png b/wpf/Gantt/DateTime-Indicator-Customization_images/gantt-control-datetime-indicator-customization.png new file mode 100644 index 0000000000..29a2f7de64 Binary files /dev/null and b/wpf/Gantt/DateTime-Indicator-Customization_images/gantt-control-datetime-indicator-customization.png differ diff --git a/wpf/Gantt/Flow-Direction-Images/Right-To-Left.png b/wpf/Gantt/Flow-Direction-Images/Right-To-Left.png deleted file mode 100644 index d8955bd3d3..0000000000 Binary files a/wpf/Gantt/Flow-Direction-Images/Right-To-Left.png and /dev/null differ diff --git a/wpf/Gantt/Flow-Direction-Images/gantt-control-flow-direction-right-to-left.png b/wpf/Gantt/Flow-Direction-Images/gantt-control-flow-direction-right-to-left.png new file mode 100644 index 0000000000..25195253fa Binary files /dev/null and b/wpf/Gantt/Flow-Direction-Images/gantt-control-flow-direction-right-to-left.png differ diff --git a/wpf/Gantt/Highlighting-Tasks_images/Highlighting-Tasks_img1.png b/wpf/Gantt/Highlighting-Tasks_images/Highlighting-Tasks_img1.png deleted file mode 100644 index 5d2783188c..0000000000 Binary files a/wpf/Gantt/Highlighting-Tasks_images/Highlighting-Tasks_img1.png and /dev/null differ diff --git a/wpf/Gantt/Highlighting-Tasks_images/gantt-control-highlighting-tasks.png b/wpf/Gantt/Highlighting-Tasks_images/gantt-control-highlighting-tasks.png new file mode 100644 index 0000000000..e89a3d21e2 Binary files /dev/null and b/wpf/Gantt/Highlighting-Tasks_images/gantt-control-highlighting-tasks.png differ diff --git a/wpf/Gantt/Import-and-Export-Support_images/Import-and-Export-Support_img1.png b/wpf/Gantt/Import-and-Export-Support_images/Import-and-Export-Support_img1.png deleted file mode 100644 index 56a7d7b672..0000000000 Binary files a/wpf/Gantt/Import-and-Export-Support_images/Import-and-Export-Support_img1.png and /dev/null differ diff --git a/wpf/Gantt/Import-and-Export-Support_images/gantt-import-and-export-support.png b/wpf/Gantt/Import-and-Export-Support_images/gantt-import-and-export-support.png new file mode 100644 index 0000000000..f1a4896a9b Binary files /dev/null and b/wpf/Gantt/Import-and-Export-Support_images/gantt-import-and-export-support.png differ diff --git a/wpf/Gantt/Localization_images/FinalOutput.png b/wpf/Gantt/Localization_images/FinalOutput.png deleted file mode 100644 index cc524da057..0000000000 Binary files a/wpf/Gantt/Localization_images/FinalOutput.png and /dev/null differ diff --git a/wpf/Gantt/Localization_images/localization-in-wpf-gantt-control.png b/wpf/Gantt/Localization_images/localization-in-wpf-gantt-control.png new file mode 100644 index 0000000000..0d7c80f525 Binary files /dev/null and b/wpf/Gantt/Localization_images/localization-in-wpf-gantt-control.png differ diff --git a/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/Resource-View-Gantt-Inline-Items_img1.png b/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/Resource-View-Gantt-Inline-Items_img1.png deleted file mode 100644 index 75f2879e23..0000000000 Binary files a/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/Resource-View-Gantt-Inline-Items_img1.png and /dev/null differ diff --git a/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/Resource-View-Gantt-Inline-Items_img2.png b/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/Resource-View-Gantt-Inline-Items_img2.png deleted file mode 100644 index 7242d1e4e8..0000000000 Binary files a/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/Resource-View-Gantt-Inline-Items_img2.png and /dev/null differ diff --git a/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/resource-view-gantt-inline-datetime-items.png b/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/resource-view-gantt-inline-datetime-items.png new file mode 100644 index 0000000000..ae2af645b3 Binary files /dev/null and b/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/resource-view-gantt-inline-datetime-items.png differ diff --git a/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/resource-view-gantt-inline-items.png b/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/resource-view-gantt-inline-items.png new file mode 100644 index 0000000000..5f952f7f7b Binary files /dev/null and b/wpf/Gantt/Resource-View-Gantt-Inline-Items_images/resource-view-gantt-inline-items.png differ diff --git a/wpf/Gantt/Strip-Lines_images/Strip-Lines_absolute.png b/wpf/Gantt/Strip-Lines_images/Strip-Lines_absolute.png deleted file mode 100644 index 76d6070a8b..0000000000 Binary files a/wpf/Gantt/Strip-Lines_images/Strip-Lines_absolute.png and /dev/null differ diff --git a/wpf/Gantt/Strip-Lines_images/Strip-Lines_img1.png b/wpf/Gantt/Strip-Lines_images/Strip-Lines_img1.png deleted file mode 100644 index db2359405b..0000000000 Binary files a/wpf/Gantt/Strip-Lines_images/Strip-Lines_img1.png and /dev/null differ diff --git a/wpf/Gantt/Strip-Lines_images/absolute-striplines-in-gantt-control.png b/wpf/Gantt/Strip-Lines_images/absolute-striplines-in-gantt-control.png new file mode 100644 index 0000000000..88db0c92e3 Binary files /dev/null and b/wpf/Gantt/Strip-Lines_images/absolute-striplines-in-gantt-control.png differ diff --git a/wpf/Gantt/Strip-Lines_images/regular-striplines-in-gantt-control.png b/wpf/Gantt/Strip-Lines_images/regular-striplines-in-gantt-control.png new file mode 100644 index 0000000000..d4ba2632cc Binary files /dev/null and b/wpf/Gantt/Strip-Lines_images/regular-striplines-in-gantt-control.png differ diff --git a/wpf/Gantt/Zooming_images/Zooming_img1.png b/wpf/Gantt/Zooming_images/Zooming_img1.png deleted file mode 100644 index 8db67c3ed6..0000000000 Binary files a/wpf/Gantt/Zooming_images/Zooming_img1.png and /dev/null differ diff --git a/wpf/Gantt/Zooming_images/Zooming_img2.png b/wpf/Gantt/Zooming_images/Zooming_img2.png deleted file mode 100644 index 0c663b7ac1..0000000000 Binary files a/wpf/Gantt/Zooming_images/Zooming_img2.png and /dev/null differ diff --git a/wpf/Gantt/Zooming_images/gantt-control-built-in-zooming.png b/wpf/Gantt/Zooming_images/gantt-control-built-in-zooming.png new file mode 100644 index 0000000000..f47cba5813 Binary files /dev/null and b/wpf/Gantt/Zooming_images/gantt-control-built-in-zooming.png differ diff --git a/wpf/Gantt/Zooming_images/gantt-control-custom-zooming.png b/wpf/Gantt/Zooming_images/gantt-control-custom-zooming.png new file mode 100644 index 0000000000..14085d56ea Binary files /dev/null and b/wpf/Gantt/Zooming_images/gantt-control-custom-zooming.png differ diff --git a/wpf/Gantt/custom-node-style.md b/wpf/Gantt/custom-node-style.md index c8ddcf0b97..b2e6de0076 100644 --- a/wpf/Gantt/custom-node-style.md +++ b/wpf/Gantt/custom-node-style.md @@ -50,252 +50,404 @@ Milestone MileStone - -The following code illustrates how to define style: - -{% capture codesnippet1 %} +{% tabs %} {% highlight xaml %} - - -  -     -         -         -             -                 -                     -                         -                             -                                 -                                 -                                 -                             -                             + + + + + - -     -     -         -             -                 -                     -                         -                             -                                 -                                 -                             -                         -                         -                             -                                 -                                 -                                 -                             -                             -                             -                                 -                                     -                                         -                                     -                                 -                             - -                             + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -  -     -         -             -                 -                     -                         + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -{% endhighlight %} -{% endcapture %} -{{ codesnippet1 | OrderList_Indent_Level_1 }} - -2. Add the style as a resource to the Gantt control in your application. - -The following code illustrates how to add the styles to the application: - -{% capture codesnippet2 %} -{% highlight xaml %} - - - - - - - - + + + + + + + + + + + + - - + + + + + {% endhighlight %} -{% endcapture %} -{{ codesnippet2 | OrderList_Indent_Level_1 }} - -![Custom-Node-Style_img1](Custom-Node-Style_images/Custom-Node-Style_img1.png) - +{% highlight c# %} -_Custom Node Style_ + this.ganttControl.ItemsSource = new ViewModel().TaskDetails; +// Task attribute mapping +TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping(); +taskAttributeMapping.TaskIdMapping = "TaskId"; +taskAttributeMapping.TaskNameMapping = "TaskName"; +taskAttributeMapping.StartDateMapping = "StartDate"; +taskAttributeMapping.ChildMapping = "Child"; +taskAttributeMapping.FinishDateMapping = "FinishDate"; +taskAttributeMapping.DurationMapping = "Duration"; +taskAttributeMapping.MileStoneMapping = "IsMileStone"; +taskAttributeMapping.PredecessorMapping = "Predecessor"; +taskAttributeMapping.ProgressMapping = "Progress"; +taskAttributeMapping.ResourceInfoMapping = "Resource"; +this.ganttControl.TaskAttributeMapping = taskAttributeMapping; +{% endhighlight %} -![Custom-Node-Style_img2](Custom-Node-Style_images/Custom-Node-Style_img2.png) +{% highlight c# tabtitle="ViewModel.cs" %} + + public class ViewModel + { + /// + /// Holds the task collections. + /// + private ObservableCollection taskCollections; + + /// + /// Initializes a new instance of the class. + /// + public ViewModel() + { + this.taskCollections = GetData(); + } + + /// + /// Gets or sets the appointment item source. + /// + /// The appointment item source. + public ObservableCollection TaskCollection + { + get + { + return this.taskCollections; + } + set + { + this.taskCollections = value; + } + } + + /// + /// Gets the data. + /// + /// The task details + public ObservableCollection GetData() + { + var taskDetails = new ObservableCollection(); + + taskDetails.Add(new TaskDetails() { TaskId = 1, TaskName = "Analysis/Planning", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + taskDetails[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 })); + taskDetails[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 })); + taskDetails[0].Child.Add((new TaskDetails() { TaskId = 4, TaskName = "Identify tools", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + taskDetails[0].Child.Add((new TaskDetails() { TaskId = 5, TaskName = "Test tools", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 8, 1), Progress = 10d })); + taskDetails[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 })); + taskDetails[0].Child.Add((new TaskDetails() { TaskId = 7, TaskName = "Analysis Complete", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 8, 10), Progress = 10d })); + + taskDetails.Add(new TaskDetails() { TaskId = 8, TaskName = "Production", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + taskDetails[1].Child.Add((new TaskDetails() { TaskId = 9, TaskName = "Software Components", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 5), Progress = 20d })); + taskDetails[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 })); + taskDetails[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 })); + taskDetails[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 })); + + taskDetails.Add(new TaskDetails() { TaskId = 13, TaskName = "Quality Assurance", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 12), Progress = 40d, }); + taskDetails[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 })); + taskDetails[2].Child.Add((new TaskDetails() { TaskId = 15, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 8), Progress = 20d })); + taskDetails[2].Child.Add((new TaskDetails() { TaskId = 16, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + taskDetails[2].Child.Add((new TaskDetails() { TaskId = 17, TaskName = "Localization Component", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 18), Progress = 10d })); + + taskDetails.Add(new TaskDetails() { TaskId = 18, TaskName = "Beta Testing", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 14), Progress = 40d }); + taskDetails[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 })); + taskDetails[3].Child.Add((new TaskDetails() { TaskId = 20, TaskName = "Obtain feedback", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + taskDetails[3].Child.Add((new TaskDetails() { TaskId = 21, TaskName = "Modify", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + taskDetails[3].Child.Add((new TaskDetails() { TaskId = 22, TaskName = "Test", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + taskDetails[3].Child.Add((new TaskDetails() { TaskId = 23, TaskName = "Complete", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 19), Progress = 10d })); + + taskDetails.Add(new TaskDetails() { TaskId = 24, TaskName = "Post-Project Review", StartDate = new DateTime(2011, 7, 3), FinishDate = new DateTime(2011, 7, 18), Progress = 40d, }); + taskDetails[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 })); + taskDetails[4].Child.Add((new TaskDetails() { TaskId = 26, TaskName = "Analyze performance", StartDate = new DateTime(2011, 7, 6), FinishDate = new DateTime(2011, 7, 7), Progress = 20d })); + taskDetails[4].Child.Add((new TaskDetails() { TaskId = 27, TaskName = "Archive files", StartDate = new DateTime(2011, 7, 10), FinishDate = new DateTime(2011, 7, 14), Progress = 10d })); + taskDetails[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 })); + taskDetails[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 })); + taskDetails[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 })); + + taskDetails[0].Resources = new ObservableCollection() { new Resource { ID = 1, Name = "John" }, new Resource { ID = 2, Name = "Neil" } }; + taskDetails[0].Child[3].Resources = new ObservableCollection() { new Resource() { ID = 3, Name = "Peter" } }; + taskDetails[1].Resources = new ObservableCollection() { new Resource() { ID = 4, Name = "David" } }; + + taskDetails[0].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 2, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[0].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[0].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + taskDetails[1].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 9, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[1].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 10, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[1].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 7, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + taskDetails[2].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[2].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[2].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 12, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + + taskDetails[3].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[3].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[3].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 19, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + + taskDetails[4].Child[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 25, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[4].Child[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 28, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[4].Child[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 30, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + taskDetails[4].Child[4].Predecessor.Add(new Predecessor() { GanttTaskIndex = 27, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); + return taskDetails; + } +} + +{% endhighlight %} +{% endtabs %} + +![gantt-custom-node-style-with-gradient](Custom-Node-Style_images/gantt-custom-node-style-with-gradient.png) +_Custom Node Style_ +![gantt-custom-node-style](Custom-Node-Style_images/gantt-custom-node-style.png) Custom Node Style {:.caption} diff --git a/wpf/Gantt/custom-schedule.md b/wpf/Gantt/custom-schedule.md index 59978a1cda..c9ee4eee95 100644 --- a/wpf/Gantt/custom-schedule.md +++ b/wpf/Gantt/custom-schedule.md @@ -132,68 +132,610 @@ To Add CustomNumeric Schedule to an application: 2. Bind the GanttScheduleRowInfo collection to the CustomScheduleSource property of the Gantt. The following code illustrates Adding Custom Schedule to an Application: -{% highlight xaml %} - - - - - - +{% tabs %} +{% highlight xaml %} + + + + + + + + + + + + + + + + + + + +