diff --git a/wpf/Diagram/Interaction/Deletion.md b/wpf/Diagram/Interaction/Deletion.md index 4cb0c5382b..cae1a9fdc9 100644 --- a/wpf/Diagram/Interaction/Deletion.md +++ b/wpf/Diagram/Interaction/Deletion.md @@ -11,27 +11,27 @@ documentation: ug Selected objects can be deleted by using the Delete key or In-built Delete command through QuickCommand. -* [ItemDeletedEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html) will notify you with the deleted item in argument. To explore about arguments , please refer to [ItemDeletedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ItemDeletedEventArgs.html). +* [ItemDeletedEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html#Syncfusion_UI_Xaml_Diagram_IGraphInfo_ItemDeleted) will notify you with the deleted item in argument. To explore about arguments , please refer to [ItemDeletedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ItemDeletedEventArgs.html). -* [ItemDeletingEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html) will notify you with the item , option to cancel the deleting operation of item and option to decide on deleting dependent Connector when its Source/Target gets deleting. To explore about arguments , please refer to [ItemDeletingEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ItemDeletingEventArgs.html). +* [ItemDeletingEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html#Syncfusion_UI_Xaml_Diagram_IGraphInfo_ItemDeletingEvent) will notify you with the item , option to cancel the deleting operation of item and option to decide on deleting dependent Connector when its Source/Target gets deleting. To explore about arguments , please refer to [ItemDeletingEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ItemDeletingEventArgs.html). {% tabs %} {% highlight C# %} (diagram.Info as IGraphInfo).ItemDeletingEvent += MainWindow_ItemDeletingEvent; - /// - /// DiagramPreviewEventArgs is the Base class for EventArgs. - /// Casting the args will help us to get ItemDeletingEventArgs. - /// - /// - /// - private void MainWindow_ItemDeletingEvent(object sender, DiagramPreviewEventArgs args) - { - //For Deleting Node Without its Dependent Connector - - (args as ItemDeletingEventArgs).DeleteDependentConnector = false; - } +/// +/// DiagramPreviewEventArgs is the Base class for EventArgs. +/// Casting the args will help us to get ItemDeletingEventArgs. +/// +/// +/// +private void MainWindow_ItemDeletingEvent(object sender, DiagramPreviewEventArgs args) +{ + //For Deleting Node Without its Dependent Connector + + (args as ItemDeletingEventArgs).DeleteDependentConnector = false; +} {% endhighlight %} {% endtabs %} diff --git a/wpf/Diagram/Interaction/Interaction_images/Delete.gif b/wpf/Diagram/Interaction/Interaction_images/Delete.gif index 68cd683e9c..10849229d2 100644 Binary files a/wpf/Diagram/Interaction/Interaction_images/Delete.gif and b/wpf/Diagram/Interaction/Interaction_images/Delete.gif differ diff --git a/wpf/Diagram/Interaction/Selection.md b/wpf/Diagram/Interaction/Selection.md index 07a4e95299..9aa45a3df1 100644 --- a/wpf/Diagram/Interaction/Selection.md +++ b/wpf/Diagram/Interaction/Selection.md @@ -27,15 +27,15 @@ Multiple elements can be selected with the following ways. 1. Shift+Click -You can select the group of elements that are contiguous (i.e. next to each other) by clicking one element, and then holding Shift and clicking the last element. All the element in the specified region are then selected. + You can select the group of elements that are contiguous (i.e. next to each other) by clicking one element, and then holding Shift and clicking the last element. All the element in the specified region are then selected. 2. Ctrl+Click -During single click, any existing item in the selection list be cleared, and only the item clicked recently is there in the selection list. To avoid cleaning the old selected item, Ctrl key must be on hold when clicking. + During single click, any existing item in the selection list be cleared, and only the item clicked recently is there in the selection list. To avoid cleaning the old selected item, Ctrl key must be on hold when clicking. 3. Selection rectangle / Rubber band selection -Clicking and dragging the Diagram area allows to create a rectangular region. The elements that are covered under the rectangular region are selected at the end. + Clicking and dragging the Diagram area allows to create a rectangular region. The elements that are covered under the rectangular region are selected at the end. Multiple selected elements are visually represented as shown. @@ -45,7 +45,7 @@ Multiple selected elements are visually represented as shown. #### Selection mode -[`SingleSelectionMode`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SfDiagram.html#Syncfusion_UI_Xaml_Diagram_SfDiagram_SingleSelectionMode) and [`MultipleSelectionMode`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SfDiagram.html#Syncfusion_UI_Xaml_Diagram_SfDiagram_MultipleSelectionMode) properties of SfDiagram allows us to decide which kind of selection need to be handle .To explore about modes, please refer to [SingleSelectionMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SingleSelectionMode.html) and [MultipleSelectionMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.MultipleSelectionMode.html). +[SingleSelectionMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SfDiagram.html#Syncfusion_UI_Xaml_Diagram_SfDiagram_SingleSelectionMode) and [MultipleSelectionMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SfDiagram.html#Syncfusion_UI_Xaml_Diagram_SfDiagram_MultipleSelectionMode) properties of `SfDiagram` allows us to decide which kind of selection need to be handle .To explore about modes, please refer to [SingleSelectionMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SingleSelectionMode.html) and [MultipleSelectionMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.MultipleSelectionMode.html). |SingleSelectionMode|Description| |--|--| @@ -56,7 +56,7 @@ Multiple selected elements are visually represented as shown. {% highlight Xaml %} + SingleSelectionMode="Select"> {% endhighlight %} {% highlight C# %} @@ -71,11 +71,10 @@ Diagram.SingleSelectionMode = SingleSelectionMode.Select; |MultipleSelectionMode|Description| |--|--| |Default|Enables all behaviors of the control.| -|HoldKeyAndTap|Enables or disables elements can be selected by holding a key and tapping.| -|JustTap|Enables or disables elements can be selected by tapping.| -|None|Disables all behaviors.| -|RubberBandCompleteIntersect|Enables or disables elements that are completely positioned in the selection rectangle will be selected.| -|RubberBandPartialIntersect|Elements that intersect with the selection rectangle will be selected.| +|HoldKeyAndTap|Enables or disables elements that can be selected by holding a key and tapping.| +|JustTap|Enables or disables elements that can be selected by tapping.| +|RubberBandCompleteIntersect|Enables or disables the selection of elements that are completely positioned within the selection rectangle.| +|RubberBandPartialIntersect|Elements intersecting with the selection rectangle will be selected.| [View sample in GitHub](https://github.com/SyncfusionExamples/WPF-Diagram-Examples/tree/master/Samples/Interaction/Selectionmode-sample) @@ -89,11 +88,9 @@ The following code example illustrates how to select/unselect an item programma {% highlight C# %} // Selects an elements - node.IsSelected = true; // Unselect an element - node.IsSelected = false; {% endhighlight %} @@ -116,26 +113,28 @@ Multiple Selection will show the preview for the selected items. We have provide {% tabs %} {% highlight Xaml %} - - - + - + + + + + + - {% endhighlight %} {% highlight C# %} @@ -166,9 +165,9 @@ Diagram control provides support to change the selection handle display mode of ## Events -* [ItemSelectingEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html) and [ItemSelectedEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html) for selecting an element, will notify you the item and its original source. To explore about arguments ,please refer to [DiagramPreviewEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.DiagramPreviewEventArgs.html) and [ItemSelectedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ItemSelectedEventArgs.html) . +* [ItemSelectingEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html#Syncfusion_UI_Xaml_Diagram_IGraphInfo_ItemSelectingEvent) and [ItemSelectedEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html#Syncfusion_UI_Xaml_Diagram_IGraphInfo_ItemSelectedEvent) for selecting an element, will notify you the item and its original source. To explore about arguments ,please refer to [DiagramPreviewEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.DiagramPreviewEventArgs.html) and [ItemSelectedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ItemSelectedEventArgs.html) . -* [ItemUnselectingEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html) and [ItemUnselectedEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html) for unselecting an element, will notify you the item and its original source.To explore about arguments ,please refer to [DiagramPreviewEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.DiagramPreviewEventArgs.html) and [DiagramEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.DiagramEventArgs.html) . +* [ItemUnselectingEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html#Syncfusion_UI_Xaml_Diagram_IGraphInfo_ItemUnSelectingEvent) and [ItemUnselectedEvent](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.IGraphInfo.html#Syncfusion_UI_Xaml_Diagram_IGraphInfo_ItemUnSelectedEvent) for unselecting an element, will notify you the item and its original source.To explore about arguments ,please refer to [DiagramPreviewEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.DiagramPreviewEventArgs.html) and [DiagramEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.DiagramEventArgs.html) . ## See Also diff --git a/wpf/Diagram/Interaction/UserHandle.md b/wpf/Diagram/Interaction/UserHandle.md index db92db2d6c..3bc2d7637c 100644 --- a/wpf/Diagram/Interaction/UserHandle.md +++ b/wpf/Diagram/Interaction/UserHandle.md @@ -23,35 +23,35 @@ SfDiagram provides support to define custom quick command around the Nodes, Conn {% highlight Xaml %} - + {% endhighlight %} {% highlight C# %} // Element to represent the frequently used commands - QuickCommandViewModel quick = new QuickCommandViewModel() - { - // Outer part of quick command. - Shape = this.Resources["Ellipse"], - // appearence of shape. - ShapeStyle = this.Resources["QuickCommandstyle"] as Style, - //Inner part of quick command and it allows to host any UI elements - Content = - "M3.7399902,0L16,12.258972 28.26001,0 32,3.7399902 19.73999,16 32,28.258972 28.26001,32 16,19.73999 3.7399902,32 0,28.258972 12.26001,16 0,3.7399902z", - - Command = (Diagram.Info as IGraphInfo).Commands.Cut - }; - - // Adding new QuickCommand object in Commands collection - (Diagram.SelectedItems as SelectorViewModel).Commands = new QuickCommandCollection() - { - quick - }; +QuickCommandViewModel quick = new QuickCommandViewModel() +{ + // Outer part of quick command. + Shape = this.Resources["Ellipse"], + // appearence of shape. + ShapeStyle = this.Resources["QuickCommandstyle"] as Style, + //Inner part of quick command and it allows to host any UI elements + Content = + "M3.7399902,0L16,12.258972 28.26001,0 32,3.7399902 19.73999,16 32,28.258972 28.26001,32 16,19.73999 3.7399902,32 0,28.258972 12.26001,16 0,3.7399902z", + + Command = (Diagram.Info as IGraphInfo).Commands.Cut +}; + +// Adding new QuickCommand object in Commands collection +(Diagram.SelectedItems as SelectorViewModel).Commands = new QuickCommandCollection() +{ + quick +}; {% endhighlight %} {% endtabs %} @@ -70,9 +70,9 @@ N> By default QuickCommand will host on Node. [VisibilityMode](https://help.sync QuickCommand can be aligned relative to boundaries of the Node or segments of the Connector. -* [`OffsetX`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetX) and [`OffsetY`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetY) property of QuickCommand is used to align the QuickCommand based on fractions. The default value is 0.5. -* [`HorizontalAlignment`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_HorizontalAlignment) and [`VerticalAlignment`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_VerticalAlignment) properties are used to align the quick commands for horizontal and vertical positions. -* [`Margin`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_Margin) is an absolute value used to add some blank space in any one of its four sides. +* [OffsetX](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetX) and [OffsetY](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetY) property of QuickCommand is used to align the QuickCommand based on fractions. The default value is 0.5. +* [HorizontalAlignment](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_HorizontalAlignment) and [VerticalAlignment](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_VerticalAlignment) properties are used to align the quick commands for horizontal and vertical positions. +* [Margin](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_Margin) is an absolute value used to add some blank space in any one of its four sides. The Alignment of QuickCommand is similar to [Annotation Alignment](https://help.syncfusion.com/wpf/sfdiagram/annotation/positioningandappearance). diff --git a/wpf/Diagram/Interaction/ZoomPan.md b/wpf/Diagram/Interaction/ZoomPan.md index 4f6708246d..e33fbb6753 100644 --- a/wpf/Diagram/Interaction/ZoomPan.md +++ b/wpf/Diagram/Interaction/ZoomPan.md @@ -9,13 +9,13 @@ documentation: ug # Zoom Pan in WPF Diagram -* We can Zoom in or Zoom out the diagram view.Diagram can be zoomed in or out by using Ctrl + mouse wheel. +* We can Zoom in or Zoom out the diagram view. Diagram can be zoomed in or out by simply holding down the Ctrl key and scrolling with your mouse wheel. * When a large Diagram is loaded, only certain portion of the Diagram is visible. The remaining portions are clipped. Clipped portions can be explored by scrolling the scrollbars or panning the Diagram. ![Zoom Pan](Interaction_images/ZoomPan.gif) -* `IntelliMouse Pan` : We can pan the diagram using scroll wheel. To pan, user must hold down the Scroll Wheel anywhere in the diagram and move the cursor towards any direction (for example: On moving cursor towards left direction, diagram will be panned towards left). And releasing Scroll Wheel will stop the panning. Speed of the Panning is proportional to the distance between the Scroll Wheel pressed position and current mouse position, i.e. panning will be faster if the distance is large and slower if the distance is small. +* **IntelliMouse Pan** : We can pan the diagram using scroll wheel. To pan, user must hold down the Scroll Wheel anywhere in the diagram and move the cursor towards any direction (for example: On moving cursor towards left direction, diagram will be panned towards left). And releasing Scroll Wheel will stop the panning. Speed of the Panning is proportional to the distance between the Scroll Wheel pressed position and current mouse position, i.e. panning will be faster if the distance is large and slower if the distance is small. ![WPF Diagram IntelliMousePan](Interaction_images/IntelliMousePan.png) diff --git a/wpf/Diagram/Page-Settings.md b/wpf/Diagram/Page-Settings.md index 8c1e69e756..d45a82b741 100644 --- a/wpf/Diagram/Page-Settings.md +++ b/wpf/Diagram/Page-Settings.md @@ -9,11 +9,11 @@ documentation: ug # Page Settings in WPF Diagram (SfDiagram) -By default, Diagram's page size is decided based on the position of diagramming elements. The size and appearance of the diagram pages can be customized using the [PageSettings](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html ) property of SfDiagram. +By default, Diagram's page size is decided based on the position of diagramming elements. The size and appearance of the diagram pages can be customized using the [PageSettings](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html ) property of `SfDiagram`. -* The [`PageWidth`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PageWidth) and [`PageHeight`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PageHeight) properties of `PageSettings` define the size of the page. -* The [`PageOrientation`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PageOrientation) property of `PageSettings` used to change the page orientation to portrait or landscape. -* Page breaks are used as a visual guide to see how the pages split into multiple pages. The [`ShowPageBreaks`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_ShowPageBreaks) property decides the Visibility of Page breaks. +* The [PageWidth](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PageWidth) and [PageHeight](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PageHeight) properties of `PageSettings` define the size of the page. +* The [PageOrientation](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PageOrientation) property of `PageSettings` used to change the page orientation to portrait or landscape. +* Page breaks are used as a visual guide to see how the pages split into multiple pages. The [ShowPageBreaks](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_ShowPageBreaks) property decides the Visibility of Page breaks. {% tabs %} {% highlight xaml %} @@ -51,7 +51,7 @@ diagram.PageSettings = new PageSettings() ## How to enable the multiple page -Based on the diagramming element position, the size of the page dynamically increases or decreases in multiples of page width and height using the [`MultiplePage`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_MultiplePage) property of PageSettings. +Based on the diagramming element position, the size of the page dynamically increases or decreases in multiples of page width and height using the [MultiplePage](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_MultiplePage) property of PageSettings. {% tabs %} {% highlight xaml %} @@ -131,7 +131,7 @@ diagram.PageSettings = new PageSettings() ## How to change the margin around the pages -The area between the main content of a page and the page edges can be changed by using the [`PrintMargin`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PrintMargin) property. Default value is 24. +The area between the main content of a page and the page edges can be changed by using the [PrintMargin](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PrintMargin) property. Default value is 24. {% tabs %} {% highlight xaml %} @@ -164,7 +164,7 @@ diagram.PageSettings = new PageSettings() ## How to change the unit of the page -The measurement units of the page can be changed by using the [`Unit`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_Unit) property of `PageSettings` class. Default unit value is Pixels. +The measurement units of the page can be changed by using the [Unit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_Unit) property of `PageSettings` class. Default unit value is Pixels. {% tabs %} {% highlight xaml %} @@ -199,7 +199,7 @@ diagram.PageSettings = new PageSettings() ## How to change the scaling of Page -The [`PrintScale`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PrintScale) property of `PageSettings` class allows you to reduce or enlarge the diagram page to fit into specific area when you print it. The default scaling of the page will be 1 (i.e 100%). +The [PrintScale](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_PrintScale) property of `PageSettings` class allows you to reduce or enlarge the diagram page to fit into specific area when you print it. The default scaling of the page will be 1 (i.e 100%). {% tabs %} {% highlight xaml %} @@ -233,7 +233,7 @@ diagram.PageSettings = new PageSettings() {% endhighlight %} {% endtabs %} -You can restrict the diagram page scaling to minimum and maximum values by using the [`MinimumPrintScale`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_MinimumPrintScale) and [`MaximumPrintScale`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_MaximumPrintScale) properties. +You can restrict the diagram page scaling to minimum and maximum values by using the [MinimumPrintScale](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_MinimumPrintScale) and [MaximumPrintScale](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_MaximumPrintScale) properties. {% tabs %} {% highlight xaml %} @@ -273,7 +273,7 @@ diagram.PageSettings = new PageSettings() By default, origin of the diagram page will be at (0,0). A virtual method `AdjustPageOrigin` of PageSettings class is used to customize the origin of the page based on the page size (`PageWidth` and `PageHeight`) and diagram elements position, which in turn helps to reduce the number of pages being printed. -The `AdjustPageOrigin` method contains the [`Info`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_Info) property in its argument, and also have the following properties and methods: +The `AdjustPageOrigin` method contains the [Info](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.PageSettings.html#Syncfusion_UI_Xaml_Diagram_PageSettings_Info) property in its argument, and also have the following properties and methods: | Properties/Methods | Description | Output | |---|---|---| @@ -316,17 +316,17 @@ Find the [Page Settings sample](https://github.com/SyncfusionExamples/WPF-Diagra ## See Also -[How to add or remove grid lines for diagram page](/wpf/diagram/gridlines) +[How to add or remove grid lines for diagram page?](/wpf/diagram/gridlines) -[How to define scroll setting for diagram page](/wpf/diagram/scroll-settings/scrollstatusandautoscroll) +[How to define scroll setting for diagram page?](/wpf/diagram/scroll-settings/scrollstatusandautoscroll) -[How to add rulers for diagram page](/wpf/diagram/rulers) +[How to add rulers for diagram page?](/wpf/diagram/rulers) -[How to print the diagram pages](/wpf/diagram/printing) +[How to print the diagram pages?](/wpf/diagram/printing) -[How to export the diagram page](/wpf/diagram/exporting) +[How to export the diagram page?](/wpf/diagram/exporting) -[How to interact with diagram page ](/wpf/diagram/interaction) +[How to interact with diagram page?](/wpf/diagram/interaction) [How to add multiple diagram pages?](https://www.syncfusion.com/kb/11463/how-to-add-multiple-diagram-pages-in-the-wpf-diagram-sfdiagram) diff --git a/wpf/Diagram/Scroll-Settings/AutoScrollLimit.md b/wpf/Diagram/Scroll-Settings/AutoScrollLimit.md index aed36a4b3d..4873c29c49 100644 --- a/wpf/Diagram/Scroll-Settings/AutoScrollLimit.md +++ b/wpf/Diagram/Scroll-Settings/AutoScrollLimit.md @@ -9,11 +9,11 @@ documentation: ug # Auto-Scroll Limit in WPF Diagram (SfDiagram) -The auto-scroll limit allows you to define the scrollable region of the Diagram while the page is getting auto scrolled. The [`AutoScrollLimit`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_AutoScrollLimit) property of scroll settings class helps to limit the auto scrolling area. It includes the following options: +The auto-scroll limit allows you to define the scrollable region of the Diagram while the page is getting auto scrolled. The [AutoScrollLimit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_AutoScrollLimit) property of scroll settings class helps to limit the auto scrolling area. It includes the following options: -* Infinity: Allows auto-scroll in all directions without any restriction. -* Diagram: Allows auto-scroll within the Diagram content. -* Limited: Allows auto-scroll within the specified area. +* **Infinity**: Allows auto-scroll in all directions without any restriction. +* **Diagram**: Allows auto-scroll within the Diagram content. +* **Limited**: Allows auto-scroll within the specified area. The default operation is `Infinity`. diff --git a/wpf/Diagram/Scroll-Settings/DragLimit.md b/wpf/Diagram/Scroll-Settings/DragLimit.md index f0bfdfe2cc..2d206d7091 100644 --- a/wpf/Diagram/Scroll-Settings/DragLimit.md +++ b/wpf/Diagram/Scroll-Settings/DragLimit.md @@ -9,11 +9,11 @@ documentation: ug # Drag Limit in WPF Diagram (SfDiagram) -The drag limit allows you to define the dragging region of the Diagram while diagram objects are getting dragged. The [`DragLimit`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_DragLimit) property of scroll settings class helps to limit the dragging area. It includes the following options: +The drag limit allows you to define the dragging region of the Diagram while diagram objects are getting dragged. The [DragLimit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_DragLimit) property of scroll settings class helps to limit the dragging area. It includes the following options: -* Infinity: Allows you to drag the diagram objects in all directions without any restriction. -* Diagram: Allows you to drag the diagram objects within the Diagram content. -* Limited: Allows you to drag the diagram objects within the specified area. The [`EditableArea`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_EditableArea) property is used to specify the area that is allowed to dragging. +* **Infinity**: Allows you to drag the diagram objects in all directions without any restriction. +* **Diagram**: Allows you to drag the diagram objects within the Diagram content. +* **Limited**: Allows you to drag the diagram objects within the specified area. The [EditableArea](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_EditableArea) property is used to specify the area that is allowed to dragging. The default operation is `Infinity`. @@ -60,12 +60,12 @@ private void Diagram_SelectorChangedEvent(object sender, SelectorChangedEventArg {% seealso %} -[How to snap the diagram objects on the diagram page](/wpf/diagram/snapping/definesnapping) +[How to snap the diagram objects on the diagram page?](/wpf/diagram/snapping/definesnapping) -[How to change the page settings of the diagram control](/wpf/diagram/page-settings) +[How to change the page settings of the diagram control?](/wpf/diagram/page-settings) -[How to add the gridlines for the diagram control](/wpf/diagram/gridlines) +[How to add the gridlines for the diagram control?](/wpf/diagram/gridlines) -[How to add the rulers for the diagram control](/wpf/diagram/rulers) +[How to add the rulers for the diagram control?](/wpf/diagram/rulers) {% endseealso %} diff --git a/wpf/Diagram/Scroll-Settings/ScrollLimit.md b/wpf/Diagram/Scroll-Settings/ScrollLimit.md index 92c79bd0c1..b7e629cae8 100644 --- a/wpf/Diagram/Scroll-Settings/ScrollLimit.md +++ b/wpf/Diagram/Scroll-Settings/ScrollLimit.md @@ -9,11 +9,11 @@ documentation: ug # Scroll Limit in WPF Diagram (SfDiagram) -The scroll limit allows you to define the scrollable region of the Diagram while mouse scrolling on the page. The [`ScrollLimit`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_ScrollLimit) property of scroll settings helps to limit the scrolling area. It includes the following options: +The scroll limit allows you to define the scrollable region of the Diagram while mouse scrolling on the page. The [ScrollLimit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.ScrollSettings.html#Syncfusion_UI_Xaml_Diagram_ScrollSettings_ScrollLimit) property of scroll settings helps to limit the scrolling area. It includes the following options: -* Infinity: Allows you to scroll in all directions without any restriction. -* Diagram: Allows you to scroll within the Diagram content. -* Limited: Allows you to scroll within the specified area. +* **Infinity**: Allows you to scroll in all directions without any restriction. +* **Diagram**: Allows you to scroll within the Diagram content. +* **Limited**: Allows you to scroll within the specified area. The default operation is `Diagram`. diff --git a/wpf/Diagram/Snapping/CustomSnapping.md b/wpf/Diagram/Snapping/CustomSnapping.md index 23a537e050..c16f28787a 100644 --- a/wpf/Diagram/Snapping/CustomSnapping.md +++ b/wpf/Diagram/Snapping/CustomSnapping.md @@ -116,6 +116,6 @@ diagram.SnapSettings = new SnapSettings() ## See Also -[How to add gridlines for diagram](https://help.syncfusion.com/wpf/diagram/gridlines) +[How to add gridlines for diagram?](https://help.syncfusion.com/wpf/diagram/gridlines) -[How to add ruler for diagram](/wpf/diagram/rulers) \ No newline at end of file +[How to add ruler for diagram?](/wpf/diagram/rulers) \ No newline at end of file diff --git a/wpf/Diagram/Snapping/DefineSnapping.md b/wpf/Diagram/Snapping/DefineSnapping.md index 7d7786dd2e..d033926a88 100644 --- a/wpf/Diagram/Snapping/DefineSnapping.md +++ b/wpf/Diagram/Snapping/DefineSnapping.md @@ -9,7 +9,7 @@ documentation: ug # Snapping in WPF Diagram (SfDiagram) -When you draw, resize, or move a diagramming element in the page, you can set it, so that it will align or snap to the nearest intersection in the page even when the grid is visible or not. However, you can control the alignment and snap-to capabilities of elements by using the snapping option of SfDiagram. +When you draw, resize, or move a diagramming element in the page, you can set it, so that it will align or snap to the nearest intersection in the page even when the grid is visible or not. However, you can control the alignment and snap-to capabilities of elements by using the snapping option of `SfDiagram`. The `SnapSettings` class and its properties allows you to snap the shapes to the ruler subdivisions more easily. @@ -71,7 +71,7 @@ diagram.SnapSettings.SnapToObject = SnapToObject.All; ## How to change the snap indication style -When snapping, cyan shade color indication lines will be shown. These indication lines styles can be customized by using the [`SnapIndicatorStyle`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SnapSettings.html#Syncfusion_UI_Xaml_Diagram_SnapSettings_SnapIndicatorStyle) property of SnapSettings class. +When snapping, cyan shade color indication lines will be shown. These indication lines styles can be customized by using the [SnapIndicatorStyle](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SnapSettings.html#Syncfusion_UI_Xaml_Diagram_SnapSettings_SnapIndicatorStyle) property of `SnapSettings` class. {% tabs %} {% highlight xaml %} @@ -118,7 +118,7 @@ diagram.SnapSettings = new SnapSettings() This feature allows the diagram objects to snap to the nearest interaction of gridlines while being dragged or resized. This feature enables easier alignment during layout or design. -Snapping to gridlines can be enabled or disabled with the [SnapConstraints](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SnapConstraints.html) property of SnapSettings. Default value is None. +Snapping to gridlines can be enabled or disabled with the [SnapConstraints](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SnapConstraints.html) property of `SnapSettings`. Default value is None. {% tabs %} {% highlight xaml %} diff --git a/wpf/Gantt/Localization_images/localization-in-wpf-gantt-control.png b/wpf/Gantt/Localization_images/localization-in-wpf-gantt-control.png index d07745e68c..f77944ee8c 100644 Binary files a/wpf/Gantt/Localization_images/localization-in-wpf-gantt-control.png and b/wpf/Gantt/Localization_images/localization-in-wpf-gantt-control.png differ diff --git a/wpf/Gantt/auto-update-hierarchy.md b/wpf/Gantt/auto-update-hierarchy.md index 5ebb9e216b..b878cf280c 100644 --- a/wpf/Gantt/auto-update-hierarchy.md +++ b/wpf/Gantt/auto-update-hierarchy.md @@ -9,7 +9,7 @@ documentation: ug # Auto Update Hierarchy in WPF Gantt -Essential Gantt provides support for auto updating hierarchy, in which the Gantt control will listen to the change in child tasks/activities and automatically update them in the parent task/activity accordingly. There is no need to have any custom logics in business objects to update the hierarchy. You can enable or disable this functionality by using the UseAutoUpdateHierarchy property. +Essential Gantt provides support for auto updating hierarchy, in which the Gantt control will listen to the change in child tasks/activities and automatically update them in the parent task/activity accordingly. There is no need to have any custom logics in business objects to update the hierarchy. You can enable or disable this functionality by using the [UseAutoUpdateHierarchy](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_UseAutoUpdateHierarchy) property. ## Use Case Scenario @@ -430,8 +430,8 @@ public class Task : NotificationObject } /// The difference between the end date and starting date is calculated exactly. - duration = endDate.Subtract(startDate); - return duration; + this.duration = endDate.Subtract(startDate); + return this.duration; } set { @@ -439,13 +439,13 @@ public class Task : NotificationObject { var sum = new TimeSpan(0, 0, 0, 0); sum = this.childCollection.Aggregate(sum, (current, task) => current + task.Duration); - duration = sum; + this.duration = sum; return; } duration = value; /// The end date is calculated to make the change in end date based on duration. The duration is interlinked with the starting date and end date, so it will affect the both based on the changes. - EndDate = startDate.AddDays(Double.Parse(duration.TotalDays.ToString())); + this.EndDate = this.startDate.AddDays(Double.Parse(this.duration.TotalDays.ToString())); } } @@ -454,17 +454,17 @@ public class Task : NotificationObject /// public DateTime EndDate { - get { return endDate; } + get { return this.endDate; } set { if (this.childCollection != null && this.childCollection.Count >= 1) { /// If this task is a parent task, then it should have the maximum end time to compare the date with maximum date of its child tasks. - if (value >= this.childCollection.Max(s => s.EndDate) && endDate != value) - endDate = value; + if (value >= this.childCollection.Max(s => s.EndDate) && this.endDate != value) + this.endDate = value; } else - endDate = value; + this.endDate = value; RaisePropertyChanged("EndDate"); /// The changed duration is invoked to notify the change in duration based on the new end date. RaisePropertyChanged("Duration"); @@ -478,7 +478,7 @@ public class Task : NotificationObject { get { - return startDate; + return this.startDate; } set { @@ -486,11 +486,11 @@ public class Task : NotificationObject if (this.childCollection != null && this.childCollection.Count >= 1) { - if (value <= this.childCollection.Min(s => s.startDate) && startDate != value) - startDate = value; + if (value <= this.childCollection.Min(s => s.startDate) && this.startDate != value) + this.startDate = value; } else - startDate = value; + this.startDate = value; RaisePropertyChanged("startDate"); /// The changed duration is invoked to notify the change in duration based on the new start date. RaisePropertyChanged("Duration"); @@ -502,10 +502,10 @@ public class Task : NotificationObject /// public string Name { - get { return name; } + get { return this.name; } set { - name = value; + this.name = value; RaisePropertyChanged("Name"); } } @@ -515,10 +515,10 @@ public class Task : NotificationObject /// public int Id { - get { return id; } + get { return this.id; } set { - id = value; + this.id = value; RaisePropertyChanged("Id"); } } @@ -573,9 +573,9 @@ public class Task : NotificationObject private void UpdateData() { /// Update the starting date and end date based on the changes made in the date of child tasks. - StartDate = this.childCollection.Select(c => c.startDate).Min(); - EndDate = this.childCollection.Select(c => c.EndDate).Max(); - progress = (this.childCollection.Aggregate(0d, (cur, task) => cur + task.progress)) / this.childCollection.Count; + this.StartDate = this.childCollection.Select(c => c.startDate).Min(); + this.EndDate = this.childCollection.Select(c => c.EndDate).Max(); + this.progress = (this.childCollection.Aggregate(0d, (cur, task) => cur + task.progress)) / this.childCollection.Count; } /// diff --git a/wpf/Gantt/baseline-support.md b/wpf/Gantt/baseline-support.md index 4f4623d9ae..ac3315804d 100644 --- a/wpf/Gantt/baseline-support.md +++ b/wpf/Gantt/baseline-support.md @@ -37,14 +37,14 @@ Type Return Type -LoadVarianceTableView +[LoadVarianceTableView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_LoadVarianceTableView) this method is used to load the Variance view of the Gantt. LoadVarianceTableView() N/A void -LoadDefaultTableView +[LoadDefaultTableView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_LoadDefaultTableView) this method is used to load the Default (Editing) view of the Gantt. LoadDefaultTableView() N/A @@ -57,8 +57,8 @@ To add Baseline Table View to an application: 1. Declare the baseline properties in the view model. 2. Map the properties to Gantt in the corresponding TaskAttributeMappingProperty. -3. To load the Variance view, call the LoadVarianceTableView() method of the Gantt. -4. To load the Default (Editing) view, call the LoadDefaultTableView() method of the Gantt. +3. To load the Variance view, call the [LoadVarianceTableView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_LoadVarianceTableView) method of the Gantt. +4. To load the Default (Editing) view, call the [LoadDefaultTableView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_LoadDefaultTableView) method of the Gantt. The following codes illustrate this: @@ -108,6 +108,12 @@ taskAttributeMapping.PredecessorMapping = "Predecessor"; taskAttributeMapping.ResourceInfoMapping = "Resource"; this.ganttControl.TaskAttributeMapping = taskAttributeMapping; +// To load the Variance Table View +this.ganttControl.LoadVarianceTableView(); + +// To load the Default [Editing] View +this.ganttControl.LoadDefaultTableView(); + {% endhighlight %} {% highlight c# tabtitle="Task.cs" %} @@ -447,11 +453,9 @@ public class ViewModel ResidentialConstructionResources = GetResources(); // Adding Tasks - taskDetails.Add(new Task() { ID = 1, Name = "Residential Construction (2500 sq.ft)", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 15), BaselineStart = new DateTime(2012, 3, 1), BaselineEnd = new DateTime(2012, 3, 14), Progress = 0d, Cost = 500, BaselineCost = 833d, }); taskDetails[0].ChildCollection.Add(new Task() { ID = 2, Name = "General Considerations", StartDate = new DateTime(2012, 7, 3), EndDate = new DateTime(2012, 7, 14), BaselineStart = new DateTime(2012, 7, 3), BaselineEnd = new DateTime(2012, 7, 14), Progress = 0d, Cost = 89, BaselineCost = 833d, }); - taskDetails[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 3, Name = "Finalize and Approve Plans", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 15), BaselineStart = new DateTime(2012, 3, 2), BaselineEnd = new DateTime(2012, 3, 16), Progress = 0d, Cost = 500, BaselineCost = 833d, }); taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 4, Name = "Review and Finalize Site Plans", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 20), BaselineStart = new DateTime(2012, 3, 1), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 500, BaselineCost = 833d, }); taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 5, Name = "Sign contract and Proceed", StartDate = new DateTime(2012, 3, 20), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 19), BaselineEnd = new DateTime(2012, 3, 21), Progress = 0d, Cost = 500, BaselineCost = 833d, }); @@ -501,7 +505,6 @@ public class ViewModel taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 40, Name = "Install Wall Insulation", StartDate = new DateTime(2012, 6, 19), EndDate = new DateTime(2012, 6, 21), BaselineStart = new DateTime(2012, 6, 19), BaselineEnd = new DateTime(2012, 6, 21), Progress = 0d, Cost = 53, BaselineCost = 83d, }); taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 41, Name = "Install Ceiling Insulation", StartDate = new DateTime(2012, 6, 21), EndDate = new DateTime(2012, 6, 22), BaselineStart = new DateTime(2012, 6, 21), BaselineEnd = new DateTime(2012, 6, 22), Progress = 0d, Cost = 89, BaselineCost = 83d, }); - taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 42, Name = "Painting and Wallpaper", StartDate = new DateTime(2012, 6, 22), EndDate = new DateTime(2012, 6, 23), BaselineStart = new DateTime(2012, 6, 22), BaselineEnd = new DateTime(2012, 6, 23), Progress = 0d, Cost = 453, BaselineCost = 563, }); taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 43, Name = "Painting all Interior", StartDate = new DateTime(2012, 6, 22), EndDate = new DateTime(2012, 6, 23), BaselineStart = new DateTime(2012, 6, 22), BaselineEnd = new DateTime(2012, 6, 23), Progress = 0d, Cost = 453, BaselineCost = 563, }); taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 44, Name = "Painting all Exterior", StartDate = new DateTime(2012, 6, 23), EndDate = new DateTime(2012, 6, 25), BaselineStart = new DateTime(2012, 6, 23), BaselineEnd = new DateTime(2012, 6, 25), Progress = 0d, Cost = 352, BaselineCost = 342, }); @@ -527,7 +530,6 @@ public class ViewModel taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 60, Name = "Final Inspection", StartDate = new DateTime(2012, 7, 16), EndDate = new DateTime(2012, 7, 17), BaselineStart = new DateTime(2012, 7, 16), BaselineEnd = new DateTime(2012, 7, 17), Progress = 0d, Cost = 0, BaselineCost = 5, }); taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 61, Name = "Move In", StartDate = new DateTime(2012, 7, 17), EndDate = new DateTime(2012, 7, 17), BaselineStart = new DateTime(2012, 7, 18), BaselineEnd = new DateTime(2012, 7, 18), Progress = 0d, Cost = 0, BaselineCost = 0, }); - //Adding Resources taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[1]); taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[0]); @@ -678,15 +680,6 @@ public class ViewModel } {% endhighlight %} -{% highlight c# %} - -// To load the Variance Table View -this.ganttControl.LoadVarianceTableView(); - -// To load the Default [Editing] View -this.ganttControl.LoadDefaultTableView(); - -{% endhighlight %} {% endtabs %} The following image shows the BaseLine Table View: @@ -715,7 +708,7 @@ Data Type Reference links -ShowBaseline +[ShowBaseline](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ShowBaseline) Controls the view of baseline in the Gantt Chart. Default value is false DependencyProperty bool @@ -738,14 +731,14 @@ Data Type Reference links -BaselineColor +[BaselineColor](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaselineColor) Used to customize the baseline color. Default value is Orange DependencyProperty Brush NA -BaselineStrokeThickness +[BaselineStrokeThickness](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaselineStrokeThickness) Used to customize the baseline thickness. Default value is 3d DependencyProperty bool @@ -792,7 +785,7 @@ Type Data Type -ShowAddNewColumn +[ShowAddNewColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ShowAddNewColumn) Gets/Sets the value that is used in displaying/hiding the add new column combo box in grid DependencyProperty bool @@ -803,8 +796,8 @@ Adding On-Demand Baseline Column Inclusion to an Application To add the On-Demand Baseline Column Inclusion to an application you need to enable the AddNewColumn of Gantt Grid, which will have a drop down cell on its head, which in turn will have the baseline columns that can be added dynamically. To enable this feature: -1. To show the Add New Column of Gantt Grid, set the ShowAddNewColumn Property to true in Gantt. -2. To include the Baseline columns in the Add New Columns drop down cell, provide the corresponding mapping name in TaskAttributeMapping. +1. To show the Add New Column of Gantt Grid, set the [ShowAddNewColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ShowAddNewColumn) Property to true in Gantt. +2. To include the Baseline columns in the Add New Columns drop down cell, provide the corresponding mapping name in [TaskAttributeMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html). 3. Mapped Baseline columns will be listed in the drop down cell. 4. By selecting a column name from the drop down cell, the corresponding column will be dynamically added to the Gantt Grid. @@ -861,104 +854,672 @@ taskAttributeMapping.BaselineStartMapping = "BaselineStart"; this.ganttControl.TaskAttributeMapping = taskAttributeMapping; {% endhighlight %} -{% endtabs %} - -## Samples Link - -To view samples: -1. Go to the Syncfusion Essential Studio installed location. - Location: Installed Location\Syncfusion\Essential Studio\{{ site.releaseversion }}\Infrastructure\Launcher\Syncfusion Control Panel -2. Open the Syncfusion Control Panel in the above location (or) Double click on the Syncfusion Control Panel desktop shortcut menu. -3. Click Run Samples for WPF under User Interface Edition panel. -4. Select Gantt. -5. Expand the Baseline Support item in the Sample Browser. -6. Choose the Baseline Table View sample to launch. +{% highlight c# tabtitle="Task.cs" %} -## Project Statistics +public class Task : INotifyPropertyChanged +{ + /// + /// Holds the start date and end date value. + /// + private DateTime startDate, endDate; + /// + /// Holds the duration value. + /// + private TimeSpan duration; -Project statistics will provide the current statistics of the project in an object form. It will have all the basic information about the project and will provide the variance between the initial plan and current progress. + /// + /// Holds the progress value. + /// + private double progress; -This will provide enough information about the project. The entire project information will be available in the form of an object of type “ProjectInfo”. You can set your own visual to display the statistics. + /// + /// Holds the id value. + /// + private int id; -#### Use Case Scenario + /// + /// Holds the name value. + /// + private string name; -This will be useful for Project Leads to take decisions based on the current status. An Organization can use this to present the current statuses of their projects to their clients. They can also use this for analysis before making important decisions on projects. + /// + /// Holds the cost value. + /// + private Double cost; -#### Methods + /// + /// Holds the baselineStart value. + /// + private DateTime baselineStart; - - - - - -
-Method -Description -Parameters -Type -Return Type
-GetProjectStatistics -this method is used to get the current statistics information about the project -GetProjectStatistics() -N/A -ProjectInfo
+ /// + /// Holds the baselineEnd value. + /// + private DateTime baselineEnd; + /// + /// Holds the baselineCost value. + /// + private Double baselineCost; -#### Adding Project Statistics to an Application + /// + /// Holds the collection value. + /// + private ObservableCollection childCollection; -To add Project Statistics to an application: + /// + /// Holds the resource value. + /// + private ObservableCollection resource; -1. Initialize new instance of ‘ProjectInfo’ class. -2. Assign the GetProjectStatistics() Methods’ return value to that instance. -3. Use the instance for further process. + /// + /// Holds the predecessor value. + /// + private ObservableCollection predecessor; -The following codes illustrate adding Project Statistics to an application: + public Task() + { + this.ChildCollection = new ObservableCollection(); + this.Predecessor = new ObservableCollection(); + this.Resource = new ObservableCollection(); + } -{% tabs %} -{% highlight xaml %} + /// + /// Gets or sets the start date. + /// + public DateTime StartDate + { + get + { + return this.startDate; + } + set + { + this.startDate = value; + OnPropertyChanged("StartDate"); + } + } - - - - - - - + /// + /// Gets or sets the finish date. + /// + public DateTime EndDate + { + get + { + return this.endDate; + } + set + { + this.endDate = value; + OnPropertyChanged("EndDate"); + } + } -{% endhighlight %} -{% highlight c# %} + /// + /// Gets or sets the duration value. + /// + public TimeSpan Duration + { + get + { + return this.duration; + } + set + { + this.duration = value; + OnPropertyChanged("Duration"); + } + } -this.ganttControl.ItemsSource = new ViewModel().TaskDetails; + /// + /// Gets or sets the id value. + /// + public int ID + { + get + { + return this.id; + } + set + { + this.id = value; + OnPropertyChanged("ID"); + } + } -// To get the Project Statistics -ProjectInfo projInfo = this.ganttControl.GetProjectStatistics(); + /// + /// Gets or sets the Name. + /// + public string Name + { + get + { + return this.name; + } + set + { + this.name = value; + OnPropertyChanged("Name"); + } + } - (or) + /// + /// Gets or sets the progress value. + /// + public double Progress + { + get + { + return this.progress; + } + set + { + this.progress = value; + OnPropertyChanged("Progress"); + } + } -ProjectInfo projInfo = new ProjectInfo(); -projInfo = this.ganttControl.GetProjectStatistics(); + /// + /// Gets or sets the cost. + /// + public Double Cost + { + get + { + return this.cost; + } + set + { + this.cost = value; + OnPropertyChanged("Cost"); + } + } -// Task attribute mapping -TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping(); -taskAttributeMapping.TaskIdMapping = "ID"; -taskAttributeMapping.TaskNameMapping = "Name"; + /// + /// Gets or sets the baseline start. + /// + public DateTime BaselineStart + { + get + { + return this.baselineStart; + } + set + { + this.baselineStart = value; + OnPropertyChanged("BaselineStart"); + } + } + + /// + /// Gets or sets the baseline end. + /// + public DateTime BaselineEnd + { + get + { + return this.baselineEnd; + } + set + { + this.baselineEnd = value; + OnPropertyChanged("BaselineEnd"); + } + } + + /// + /// Gets or sets the baseline cost. + /// + public Double BaselineCost + { + get + { + return this.baselineCost; + } + set + { + this.baselineCost = value; + OnPropertyChanged("BaselineCost"); + } + } + + /// + /// Gets or sets the child collection. + /// + public ObservableCollection ChildCollection + { + get + { + return this.childCollection; + } + set + { + this.childCollection = value; + OnPropertyChanged("ChildCollection"); + } + } + + /// + /// Gets or sets the resource value. + /// + public ObservableCollection Resource + { + get + { + return this.resource; + } + set + { + this.resource = value; + OnPropertyChanged("Resource"); + } + } + + /// + /// Gets or sets the predecessor value. + /// + public ObservableCollection Predecessor + { + get + { + return this.predecessor; + } + set + { + this.predecessor = value; + OnPropertyChanged("Predecessor"); + } + } + + /// + /// Method for property changed. + /// + private void OnPropertyChanged(string propName) + { + if (this.PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propName)); + } + } + + public event PropertyChangedEventHandler PropertyChanged; +} + +{% endhighlight %} + +{% highlight c# tabtitle="ViewModel.cs" %} + +public class ViewModel +{ + public ViewModel() + { + this.taskDetails = this.GetTaskDetails(); + } + + /// + /// Holds the task details value. + /// + private ObservableCollection taskDetails; + + /// + /// Gets or sets the task collection. + /// + /// The task collection. + public ObservableCollection TaskDetails + { + get + { + return taskDetails; + } + set + { + this.taskDetails = value; + } + } + + /// + /// Gets the task details. + /// + /// + ObservableCollection GetTaskDetails() + { + var taskDetails = new ObservableCollection(); + + // Collection to Strore the Required Resources. + ObservableCollection ResidentialConstructionResources = new ObservableCollection(); + ResidentialConstructionResources = GetResources(); + + // Adding Tasks + + taskDetails.Add(new Task() { ID = 1, Name = "Residential Construction (2500 sq.ft)", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 15), BaselineStart = new DateTime(2012, 3, 1), BaselineEnd = new DateTime(2012, 3, 14), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 2, Name = "General Considerations", StartDate = new DateTime(2012, 7, 3), EndDate = new DateTime(2012, 7, 14), BaselineStart = new DateTime(2012, 7, 3), BaselineEnd = new DateTime(2012, 7, 14), Progress = 0d, Cost = 89, BaselineCost = 833d, }); + + taskDetails[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 3, Name = "Finalize and Approve Plans", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 15), BaselineStart = new DateTime(2012, 3, 2), BaselineEnd = new DateTime(2012, 3, 16), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 4, Name = "Review and Finalize Site Plans", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 20), BaselineStart = new DateTime(2012, 3, 1), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 5, Name = "Sign contract and Proceed", StartDate = new DateTime(2012, 3, 20), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 19), BaselineEnd = new DateTime(2012, 3, 21), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + + taskDetails[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 6, Name = "Contracts and Agreements", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 21), Progress = 0d, Cost = 20d, BaselineCost = 14 }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 7, Name = "Lot Sale Agreement", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 20d, BaselineCost = 14 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 8, Name = "Construction Agreement", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 21), BaselineEnd = new DateTime(2012, 3, 21), Progress = 0d, Cost = 33d, BaselineCost = 12 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 9, Name = "Contract Specifications", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 30d, BaselineCost = 50 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 10, Name = "Contract Site Plan", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 360d, BaselineCost = 100 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 11, Name = "Financing", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 39d, BaselineCost = 16 })); + + taskDetails[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 12, Name = "Apply Permits", StartDate = new DateTime(2012, 3, 23), EndDate = new DateTime(2012, 3, 24), BaselineStart = new DateTime(2012, 3, 22), BaselineEnd = new DateTime(2012, 3, 23), Progress = 0d, Cost = 53d, BaselineCost = 65 }); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection.Add((new Task() { ID = 13, Name = "Foundation Permit", StartDate = new DateTime(2012, 3, 23), EndDate = new DateTime(2012, 3, 24), BaselineStart = new DateTime(2012, 3, 22), BaselineEnd = new DateTime(2012, 3, 23), Progress = 0d, Cost = 53d, BaselineCost = 65 })); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection.Add((new Task() { ID = 14, Name = "Electrical Permit", StartDate = new DateTime(2012, 3, 24), EndDate = new DateTime(2012, 3, 25), BaselineStart = new DateTime(2012, 3, 24), BaselineEnd = new DateTime(2012, 3, 25), Progress = 0d, Cost = 23d, BaselineCost = 34 })); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection.Add((new Task() { ID = 15, Name = "Plumbing Permit", StartDate = new DateTime(2012, 3, 25), EndDate = new DateTime(2012, 3, 26), BaselineStart = new DateTime(2012, 3, 25), BaselineEnd = new DateTime(2012, 3, 26), Progress = 0d, Cost = 63d, BaselineCost = 53 })); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 16, Name = "Site Work", StartDate = new DateTime(2012, 3, 26), EndDate = new DateTime(2012, 3, 27), BaselineStart = new DateTime(2012, 3, 26), BaselineEnd = new DateTime(2012, 3, 27), Progress = 0d, Cost = 2000d, BaselineCost = 1000 }); + taskDetails[0].ChildCollection[1].ChildCollection.Add(new Task() { ID = 17, Name = "Clear Lot", StartDate = new DateTime(2012, 3, 26), EndDate = new DateTime(2012, 3, 27), BaselineStart = new DateTime(2012, 3, 27), BaselineEnd = new DateTime(2012, 3, 28), Progress = 0d, Cost = 2000d, BaselineCost = 1000 }); + taskDetails[0].ChildCollection[1].ChildCollection.Add(new Task() { ID = 18, Name = "Strip Topsoil", StartDate = new DateTime(2012, 3, 27), EndDate = new DateTime(2012, 3, 28), BaselineStart = new DateTime(2012, 3, 27), BaselineEnd = new DateTime(2012, 3, 28), Progress = 0d, Cost = 1200d, BaselineCost = 800 }); + taskDetails[0].ChildCollection[1].ChildCollection.Add(new Task() { ID = 19, Name = "Installing Temporary requirements", StartDate = new DateTime(2012, 3, 28), EndDate = new DateTime(2012, 3, 29), BaselineStart = new DateTime(2012, 3, 30), BaselineEnd = new DateTime(2012, 4, 2), Progress = 0d, Cost = 354d, BaselineCost = 230 }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 20, Name = "Foundation", StartDate = new DateTime(2012, 3, 29), EndDate = new DateTime(2012, 4, 2), BaselineStart = new DateTime(2012, 3, 29), BaselineEnd = new DateTime(2012, 4, 2), Progress = 0d, Cost = 899, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 21, Name = "Excavate for foundation", StartDate = new DateTime(2012, 3, 29), EndDate = new DateTime(2012, 4, 2), BaselineStart = new DateTime(2012, 3, 29), BaselineEnd = new DateTime(2012, 4, 2), Progress = 0d, Cost = 899, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 22, Name = "Building Basement Walls", StartDate = new DateTime(2012, 4, 3), EndDate = new DateTime(2012, 4, 8), BaselineStart = new DateTime(2012, 4, 3), BaselineEnd = new DateTime(2012, 4, 8), Progress = 0d, Cost = 889, BaselineCost = 803d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 23, Name = "Foundation inspection", StartDate = new DateTime(2012, 4, 8), EndDate = new DateTime(2012, 4, 10), BaselineStart = new DateTime(2012, 4, 7), BaselineEnd = new DateTime(2012, 4, 9), Progress = 0d, Cost = 8, BaselineCost = 8d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 24, Name = "Finishing Foundation", StartDate = new DateTime(2012, 4, 10), EndDate = new DateTime(2012, 4, 17), BaselineStart = new DateTime(2012, 4, 10), BaselineEnd = new DateTime(2012, 4, 17), Progress = 0d, Cost = 0, BaselineCost = 8d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 25, Name = "Framing", StartDate = new DateTime(2012, 4, 18), EndDate = new DateTime(2012, 4, 24), BaselineStart = new DateTime(2012, 4, 18), BaselineEnd = new DateTime(2012, 4, 24), Progress = 0d, Cost = 890, BaselineCost = 803d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 26, Name = "First Floor Framing", StartDate = new DateTime(2012, 4, 18), EndDate = new DateTime(2012, 4, 24), BaselineStart = new DateTime(2012, 4, 17), BaselineEnd = new DateTime(2012, 4, 23), Progress = 0d, Cost = 890, BaselineCost = 803d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 27, Name = "Second Floor Framing", StartDate = new DateTime(2012, 4, 24), EndDate = new DateTime(2012, 5, 3), BaselineStart = new DateTime(2012, 4, 24), BaselineEnd = new DateTime(2012, 5, 3), Progress = 0d, Cost = 789, BaselineCost = 898d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 28, Name = "Framing Roof", StartDate = new DateTime(2012, 5, 3), EndDate = new DateTime(2012, 5, 7), BaselineStart = new DateTime(2012, 5, 4), BaselineEnd = new DateTime(2012, 5, 8), Progress = 0d, Cost = 780, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 29, Name = "Framing Inspection", StartDate = new DateTime(2012, 5, 7), EndDate = new DateTime(2012, 5, 8), BaselineStart = new DateTime(2012, 5, 7), BaselineEnd = new DateTime(2012, 5, 8), Progress = 0d, Cost = 5, BaselineCost = 8d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 30, Name = "Dry In", StartDate = new DateTime(2012, 5, 8), EndDate = new DateTime(2012, 5, 14), BaselineStart = new DateTime(2012, 5, 8), BaselineEnd = new DateTime(2012, 5, 15), Progress = 0d, Cost = 232, BaselineCost = 323d, }); + taskDetails[0].ChildCollection[4].ChildCollection.Add(new Task() { ID = 31, Name = "Installing Sheathing for floors", StartDate = new DateTime(2012, 5, 8), EndDate = new DateTime(2012, 5, 14), BaselineStart = new DateTime(2012, 5, 9), BaselineEnd = new DateTime(2012, 5, 15), Progress = 0d, Cost = 232, BaselineCost = 323d, }); + taskDetails[0].ChildCollection[4].ChildCollection.Add(new Task() { ID = 32, Name = "Installing Windows", StartDate = new DateTime(2012, 5, 14), EndDate = new DateTime(2012, 5, 25), BaselineStart = new DateTime(2012, 5, 14), BaselineEnd = new DateTime(2012, 5, 25), Progress = 0d, Cost = 325, BaselineCost = 452d, }); + taskDetails[0].ChildCollection[4].ChildCollection.Add(new Task() { ID = 33, Name = "Installing Sheathing for Roof", StartDate = new DateTime(2012, 5, 25), EndDate = new DateTime(2012, 5, 30), BaselineStart = new DateTime(2012, 5, 23), BaselineEnd = new DateTime(2012, 5, 30), Progress = 0d, Cost = 82, BaselineCost = 83d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 34, Name = "Exterior Finishing", StartDate = new DateTime(2012, 5, 31), EndDate = new DateTime(2012, 6, 12), BaselineStart = new DateTime(2012, 5, 31), BaselineEnd = new DateTime(2012, 6, 12), Progress = 0d, Cost = 463, BaselineCost = 633d, }); + taskDetails[0].ChildCollection[5].ChildCollection.Add(new Task() { ID = 35, Name = "Exterior Trimming", StartDate = new DateTime(2012, 5, 31), EndDate = new DateTime(2012, 6, 12), BaselineStart = new DateTime(2012, 5, 31), BaselineEnd = new DateTime(2012, 6, 12), Progress = 0d, Cost = 463, BaselineCost = 633d, }); + taskDetails[0].ChildCollection[5].ChildCollection.Add(new Task() { ID = 36, Name = "Completing Exterior Bricks", StartDate = new DateTime(2012, 6, 12), EndDate = new DateTime(2012, 6, 17), BaselineStart = new DateTime(2012, 6, 12), BaselineEnd = new DateTime(2012, 6, 17), Progress = 0d, Cost = 234, BaselineCost = 333d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 37, Name = "Interior Finishing", StartDate = new DateTime(2012, 6, 17), EndDate = new DateTime(2012, 6, 19), BaselineStart = new DateTime(2012, 6, 17), BaselineEnd = new DateTime(2012, 6, 19), Progress = 0d, Cost = 43, BaselineCost = 33d, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 38, Name = "Installing Insulation", StartDate = new DateTime(2012, 6, 17), EndDate = new DateTime(2012, 6, 19), BaselineStart = new DateTime(2012, 6, 17), BaselineEnd = new DateTime(2012, 6, 19), Progress = 0d, Cost = 43, BaselineCost = 33d, }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 39, Name = "Install Floor Insulation", StartDate = new DateTime(2012, 6, 17), EndDate = new DateTime(2012, 6, 19), BaselineStart = new DateTime(2012, 6, 17), BaselineEnd = new DateTime(2012, 6, 19), Progress = 0d, Cost = 43, BaselineCost = 33d, }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 40, Name = "Install Wall Insulation", StartDate = new DateTime(2012, 6, 19), EndDate = new DateTime(2012, 6, 21), BaselineStart = new DateTime(2012, 6, 19), BaselineEnd = new DateTime(2012, 6, 21), Progress = 0d, Cost = 53, BaselineCost = 83d, }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 41, Name = "Install Ceiling Insulation", StartDate = new DateTime(2012, 6, 21), EndDate = new DateTime(2012, 6, 22), BaselineStart = new DateTime(2012, 6, 21), BaselineEnd = new DateTime(2012, 6, 22), Progress = 0d, Cost = 89, BaselineCost = 83d, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 42, Name = "Painting and Wallpaper", StartDate = new DateTime(2012, 6, 22), EndDate = new DateTime(2012, 6, 23), BaselineStart = new DateTime(2012, 6, 22), BaselineEnd = new DateTime(2012, 6, 23), Progress = 0d, Cost = 453, BaselineCost = 563, }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 43, Name = "Painting all Interior", StartDate = new DateTime(2012, 6, 22), EndDate = new DateTime(2012, 6, 23), BaselineStart = new DateTime(2012, 6, 22), BaselineEnd = new DateTime(2012, 6, 23), Progress = 0d, Cost = 453, BaselineCost = 563, }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 44, Name = "Painting all Exterior", StartDate = new DateTime(2012, 6, 23), EndDate = new DateTime(2012, 6, 25), BaselineStart = new DateTime(2012, 6, 23), BaselineEnd = new DateTime(2012, 6, 25), Progress = 0d, Cost = 352, BaselineCost = 342, }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 45, Name = "Additional Trimming Work", StartDate = new DateTime(2012, 6, 25), EndDate = new DateTime(2012, 6, 27), BaselineStart = new DateTime(2012, 6, 25), BaselineEnd = new DateTime(2012, 6, 27), Progress = 0d, Cost = 32, BaselineCost = 50, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 46, Name = "Finishing Plumbing", StartDate = new DateTime(2012, 6, 27), EndDate = new DateTime(2012, 6, 29), BaselineStart = new DateTime(2012, 6, 27), BaselineEnd = new DateTime(2012, 6, 29), Progress = 0d, Cost = 424, BaselineCost = 423, }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection.Add(new Task() { ID = 47, Name = "First floor Plumbing", StartDate = new DateTime(2012, 6, 27), EndDate = new DateTime(2012, 6, 29), BaselineStart = new DateTime(2012, 6, 27), BaselineEnd = new DateTime(2012, 6, 29), Progress = 0d, Cost = 424, BaselineCost = 423, }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection.Add(new Task() { ID = 48, Name = "Second floor plumbing", StartDate = new DateTime(2012, 6, 29), EndDate = new DateTime(2012, 7, 1), BaselineStart = new DateTime(2012, 6, 29), BaselineEnd = new DateTime(2012, 7, 1), Progress = 0d, Cost = 234, BaselineCost = 324, }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection.Add(new Task() { ID = 49, Name = "Inspecting Plumbing", StartDate = new DateTime(2012, 7, 1), EndDate = new DateTime(2012, 7, 3), BaselineStart = new DateTime(2012, 7, 1), BaselineEnd = new DateTime(2012, 7, 3), Progress = 0d, Cost = 23, BaselineCost = 33d, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 50, Name = "Finishing Electrical", StartDate = new DateTime(2012, 7, 3), EndDate = new DateTime(2012, 7, 5), BaselineStart = new DateTime(2012, 7, 3), BaselineEnd = new DateTime(2012, 7, 5), Progress = 0d, Cost = 432, BaselineCost = 536, }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection.Add(new Task() { ID = 51, Name = "Progress first floor connections", StartDate = new DateTime(2012, 7, 3), EndDate = new DateTime(2012, 7, 5), BaselineStart = new DateTime(2012, 7, 3), BaselineEnd = new DateTime(2012, 7, 5), Progress = 0d, Cost = 432, BaselineCost = 536, }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection.Add(new Task() { ID = 52, Name = "Progress second floor connections", StartDate = new DateTime(2012, 7, 5), EndDate = new DateTime(2012, 7, 7), BaselineStart = new DateTime(2012, 7, 4), BaselineEnd = new DateTime(2012, 7, 6), Progress = 0d, Cost = 563, BaselineCost = 463, }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection.Add(new Task() { ID = 53, Name = "Progress non-Electrical Wiring", StartDate = new DateTime(2012, 7, 7), EndDate = new DateTime(2012, 7, 8), BaselineStart = new DateTime(2012, 7, 7), BaselineEnd = new DateTime(2012, 7, 8), Progress = 0d, Cost = 234, BaselineCost = 563, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 54, Name = "Carpet,Tiles and Furnishing", StartDate = new DateTime(2012, 7, 8), EndDate = new DateTime(2012, 7, 10), BaselineStart = new DateTime(2012, 7, 9), BaselineEnd = new DateTime(2012, 7, 11), Progress = 0d, Cost = 253, BaselineCost = 210, }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection.Add(new Task() { ID = 55, Name = "Progress first floor carpet", StartDate = new DateTime(2012, 7, 8), EndDate = new DateTime(2012, 7, 10), BaselineStart = new DateTime(2012, 7, 8), BaselineEnd = new DateTime(2012, 7, 10), Progress = 0d, Cost = 253, BaselineCost = 210, }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection.Add(new Task() { ID = 56, Name = "Progress second floor carpet", StartDate = new DateTime(2012, 7, 10), EndDate = new DateTime(2012, 7, 13), BaselineStart = new DateTime(2012, 7, 10), BaselineEnd = new DateTime(2012, 7, 13), Progress = 0d, Cost = 341, BaselineCost = 300, }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection.Add(new Task() { ID = 57, Name = "Progress Furnishing Kitchen, bath, hall", StartDate = new DateTime(2012, 7, 13), EndDate = new DateTime(2012, 7, 14), BaselineStart = new DateTime(2012, 7, 13), BaselineEnd = new DateTime(2012, 7, 14), Progress = 0, Cost = 4252, BaselineCost = 6033d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 58, Name = "Final Acceptance", StartDate = new DateTime(2012, 7, 14), EndDate = new DateTime(2012, 7, 16), BaselineStart = new DateTime(2012, 7, 14), BaselineEnd = new DateTime(2012, 7, 16), Progress = 0d, Cost = 430, BaselineCost = 433d, }); + taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 59, Name = "Cleaning", StartDate = new DateTime(2012, 7, 14), EndDate = new DateTime(2012, 7, 16), BaselineStart = new DateTime(2012, 7, 14), BaselineEnd = new DateTime(2012, 7, 16), Progress = 0d, Cost = 430, BaselineCost = 433d, }); + taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 60, Name = "Final Inspection", StartDate = new DateTime(2012, 7, 16), EndDate = new DateTime(2012, 7, 17), BaselineStart = new DateTime(2012, 7, 16), BaselineEnd = new DateTime(2012, 7, 17), Progress = 0d, Cost = 0, BaselineCost = 5, }); + taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 61, Name = "Move In", StartDate = new DateTime(2012, 7, 17), EndDate = new DateTime(2012, 7, 17), BaselineStart = new DateTime(2012, 7, 18), BaselineEnd = new DateTime(2012, 7, 18), Progress = 0d, Cost = 0, BaselineCost = 0, }); + + //Adding Resources + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[1]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[0]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[2]); + + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[0]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[1]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[2]); + + taskDetails[0].ChildCollection[1].ChildCollection[0].Resource.Add(ResidentialConstructionResources[3]); + taskDetails[0].ChildCollection[1].ChildCollection[1].Resource.Add(ResidentialConstructionResources[3]); + taskDetails[0].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[5]); + taskDetails[0].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[6]); + taskDetails[0].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[4]); + + taskDetails[0].ChildCollection[2].ChildCollection[0].Resource.Add(ResidentialConstructionResources[3]); + taskDetails[0].ChildCollection[2].ChildCollection[1].Resource.Add(ResidentialConstructionResources[6]); + taskDetails[0].ChildCollection[2].ChildCollection[2].Resource.Add(ResidentialConstructionResources[7]); + taskDetails[0].ChildCollection[2].ChildCollection[3].Resource.Add(ResidentialConstructionResources[3]); + + taskDetails[0].ChildCollection[3].ChildCollection[0].Resource.Add(ResidentialConstructionResources[8]); + taskDetails[0].ChildCollection[3].ChildCollection[1].Resource.Add(ResidentialConstructionResources[8]); + taskDetails[0].ChildCollection[3].ChildCollection[2].Resource.Add(ResidentialConstructionResources[9]); + taskDetails[0].ChildCollection[3].ChildCollection[3].Resource.Add(ResidentialConstructionResources[7]); + + taskDetails[0].ChildCollection[4].ChildCollection[0].Resource.Add(ResidentialConstructionResources[8]); + taskDetails[0].ChildCollection[4].ChildCollection[1].Resource.Add(ResidentialConstructionResources[9]); + taskDetails[0].ChildCollection[4].ChildCollection[2].Resource.Add(ResidentialConstructionResources[8]); + + taskDetails[0].ChildCollection[5].ChildCollection[0].Resource.Add(ResidentialConstructionResources[14]); + taskDetails[0].ChildCollection[5].ChildCollection[1].Resource.Add(ResidentialConstructionResources[8]); + + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[10]); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[10]); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[2].Resource.Add(ResidentialConstructionResources[10]); + + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[0].Resource.Add(ResidentialConstructionResources[12]); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[1].Resource.Add(ResidentialConstructionResources[12]); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[12]); + + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[0].Resource.Add(ResidentialConstructionResources[5]); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[1].Resource.Add(ResidentialConstructionResources[5]); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[2].Resource.Add(ResidentialConstructionResources[7]); + + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[0].Resource.Add(ResidentialConstructionResources[4]); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[1].Resource.Add(ResidentialConstructionResources[4]); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[2].Resource.Add(ResidentialConstructionResources[4]); + + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[0].Resource.Add(ResidentialConstructionResources[13]); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[1].Resource.Add(ResidentialConstructionResources[13]); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[2].Resource.Add(ResidentialConstructionResources[14]); + + taskDetails[0].ChildCollection[7].ChildCollection[0].Resource.Add(ResidentialConstructionResources[16]); + taskDetails[0].ChildCollection[7].ChildCollection[1].Resource.Add(ResidentialConstructionResources[7]); + taskDetails[0].ChildCollection[7].ChildCollection[2].Resource.Add(ResidentialConstructionResources[1]); + + //Adding Predecessors + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 4, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[4].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + + taskDetails[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 13, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 14, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 15, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 17, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[2].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 19, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[2].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 21, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 19, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[2].ChildCollection[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 23, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[3].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 24, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[3].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 26, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[3].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 27, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[3].ChildCollection[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 28, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[4].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 29, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[4].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 31, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[4].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 32, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[5].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 33, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[5].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 35, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 36, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 39, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 40, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 41, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 43, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 44, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 43, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 45, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 47, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 48, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 49, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 48, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 51, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 52, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 53, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 55, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 56, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[7].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 57, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[7].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 59, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[7].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 60, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + return taskDetails; + } + + /// + /// Gets the resources. + /// + /// + private static ObservableCollection GetResources() + { + ObservableCollection Resources = new ObservableCollection(); + Resources.Add(new Resource() { ID = 1, Name = "General Contractor" }); + Resources.Add(new Resource() { ID = 2, Name = "Owner" }); + Resources.Add(new Resource() { ID = 3, Name = "Architect" }); + Resources.Add(new Resource() { ID = 4, Name = "Site Excavation Contractor" }); + Resources.Add(new Resource() { ID = 5, Name = "Electrical Contractor" }); + Resources.Add(new Resource() { ID = 6, Name = "Plumbing Contractor" }); + Resources.Add(new Resource() { ID = 7, Name = "Concrete Contractor" }); + Resources.Add(new Resource() { ID = 8, Name = "Inspector" }); + Resources.Add(new Resource() { ID = 9, Name = "Framing Contractor" }); + Resources.Add(new Resource() { ID = 10, Name = "Roofing Contractor" }); + Resources.Add(new Resource() { ID = 11, Name = "Insulation Contractor" }); + Resources.Add(new Resource() { ID = 12, Name = "Drywall contractor" }); + Resources.Add(new Resource() { ID = 13, Name = "Painting Contractor" }); + Resources.Add(new Resource() { ID = 14, Name = "Flooring Contractor" }); + Resources.Add(new Resource() { ID = 15, Name = "Appliance Contractor" }); + Resources.Add(new Resource() { ID = 16, Name = "Masonry Contractor" }); + Resources.Add(new Resource() { ID = 17, Name = "MaID Service" }); + + return Resources; + } +} + +{% endhighlight %} +{% endtabs %} + +## Samples Link + +To view samples: + +1. Go to the Syncfusion Essential Studio installed location. + Location: Installed Location\Syncfusion\Essential Studio\{{ site.releaseversion }}\Infrastructure\Launcher\Syncfusion Control Panel +2. Open the Syncfusion Control Panel in the above location (or) Double click on the Syncfusion Control Panel desktop shortcut menu. +3. Click Run Samples for WPF under User Interface Edition panel. +4. Select Gantt. +5. Expand the Baseline Support item in the Sample Browser. +6. Choose the Baseline Table View sample to launch. + +## Project Statistics + + +Project statistics will provide the current statistics of the project in an object form. It will have all the basic information about the project and will provide the variance between the initial plan and current progress. + +This will provide enough information about the project. The entire project information will be available in the form of an object of type “ProjectInfo”. You can set your own visual to display the statistics. + +#### Use Case Scenario + +This will be useful for Project Leads to take decisions based on the current status. An Organization can use this to present the current statuses of their projects to their clients. They can also use this for analysis before making important decisions on projects. + +#### Methods + + + + + + +
+Method +Description +Parameters +Type +Return Type
+[GetProjectStatistics](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_GetProjectStatistics) +this method is used to get the current statistics information about the project +GetProjectStatistics() +N/A +ProjectInfo
+ + +#### Adding Project Statistics to an Application + +To add Project Statistics to an application: + +1. Initialize new instance of ‘ProjectInfo’ class. +2. Assign the GetProjectStatistics() Methods’ return value to that instance. +3. Use the instance for further process. + +The following codes illustrate adding Project Statistics to an application: + +{% tabs %} +{% highlight xaml %} + + + + + + + + + +{% endhighlight %} +{% highlight c# %} + +this.ganttControl.ItemsSource = new ViewModel().TaskDetails; + +// To get the Project Statistics +ProjectInfo projInfo = this.ganttControl.GetProjectStatistics(); + + (or) + +ProjectInfo projInfo = new ProjectInfo(); +projInfo = this.ganttControl.GetProjectStatistics(); + +// Task attribute mapping +TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping(); +taskAttributeMapping.TaskIdMapping = "ID"; +taskAttributeMapping.TaskNameMapping = "Name"; taskAttributeMapping.StartDateMapping = "StartDate"; taskAttributeMapping.ChildMapping = "ChildCollection"; taskAttributeMapping.FinishDateMapping = "EndDate"; @@ -971,7 +1532,575 @@ taskAttributeMapping.BaselineFinishMapping = "BaselineEnd"; taskAttributeMapping.BaselineStartMapping = "BaselineStart"; this.ganttControl.TaskAttributeMapping = taskAttributeMapping; -{% endhighlight %} +{% endhighlight %} + +{% highlight c# tabtitle="Task.cs" %} + +public class Task : INotifyPropertyChanged +{ + /// + /// Holds the start date and end date value. + /// + private DateTime startDate, endDate; + + /// + /// Holds the duration value. + /// + private TimeSpan duration; + + /// + /// Holds the progress value. + /// + private double progress; + + /// + /// Holds the id value. + /// + private int id; + + /// + /// Holds the name value. + /// + private string name; + + /// + /// Holds the cost value. + /// + private Double cost; + + /// + /// Holds the baselineStart value. + /// + private DateTime baselineStart; + + /// + /// Holds the baselineEnd value. + /// + private DateTime baselineEnd; + + /// + /// Holds the baselineCost value. + /// + private Double baselineCost; + + /// + /// Holds the collection value. + /// + private ObservableCollection childCollection; + + /// + /// Holds the resource value. + /// + private ObservableCollection resource; + + /// + /// Holds the predecessor value. + /// + private ObservableCollection predecessor; + + public Task() + { + this.ChildCollection = new ObservableCollection(); + this.Predecessor = new ObservableCollection(); + this.Resource = new ObservableCollection(); + } + + /// + /// Gets or sets the start date. + /// + public DateTime StartDate + { + get + { + return this.startDate; + } + set + { + this.startDate = value; + OnPropertyChanged("StartDate"); + } + } + + /// + /// Gets or sets the finish date. + /// + public DateTime EndDate + { + get + { + return this.endDate; + } + set + { + this.endDate = value; + OnPropertyChanged("EndDate"); + } + } + + /// + /// Gets or sets the duration value. + /// + public TimeSpan Duration + { + get + { + return this.duration; + } + set + { + this.duration = value; + OnPropertyChanged("Duration"); + } + } + + /// + /// Gets or sets the id value. + /// + public int ID + { + get + { + return this.id; + } + set + { + this.id = value; + OnPropertyChanged("ID"); + } + } + + /// + /// Gets or sets the Name. + /// + public string Name + { + get + { + return this.name; + } + set + { + this.name = value; + OnPropertyChanged("Name"); + } + } + + /// + /// Gets or sets the progress value. + /// + public double Progress + { + get + { + return this.progress; + } + set + { + this.progress = value; + OnPropertyChanged("Progress"); + } + } + + /// + /// Gets or sets the cost. + /// + public Double Cost + { + get + { + return this.cost; + } + set + { + this.cost = value; + OnPropertyChanged("Cost"); + } + } + + /// + /// Gets or sets the baseline start. + /// + public DateTime BaselineStart + { + get + { + return this.baselineStart; + } + set + { + this.baselineStart = value; + OnPropertyChanged("BaselineStart"); + } + } + + /// + /// Gets or sets the baseline end. + /// + public DateTime BaselineEnd + { + get + { + return this.baselineEnd; + } + set + { + this.baselineEnd = value; + OnPropertyChanged("BaselineEnd"); + } + } + + /// + /// Gets or sets the baseline cost. + /// + public Double BaselineCost + { + get + { + return this.baselineCost; + } + set + { + this.baselineCost = value; + OnPropertyChanged("BaselineCost"); + } + } + + /// + /// Gets or sets the child collection. + /// + public ObservableCollection ChildCollection + { + get + { + return this.childCollection; + } + set + { + this.childCollection = value; + OnPropertyChanged("ChildCollection"); + } + } + + /// + /// Gets or sets the resource value. + /// + public ObservableCollection Resource + { + get + { + return this.resource; + } + set + { + this.resource = value; + OnPropertyChanged("Resource"); + } + } + + /// + /// Gets or sets the predecessor value. + /// + public ObservableCollection Predecessor + { + get + { + return this.predecessor; + } + set + { + this.predecessor = value; + OnPropertyChanged("Predecessor"); + } + } + + /// + /// Method for property changed. + /// + private void OnPropertyChanged(string propName) + { + if (this.PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(propName)); + } + } + + public event PropertyChangedEventHandler PropertyChanged; +} + +{% endhighlight %} + +{% highlight c# tabtitle="ViewModel.cs" %} + +public class ViewModel +{ + public ViewModel() + { + this.taskDetails = this.GetTaskDetails(); + } + + /// + /// Holds the task details value. + /// + private ObservableCollection taskDetails; + + /// + /// Gets or sets the task collection. + /// + /// The task collection. + public ObservableCollection TaskDetails + { + get + { + return taskDetails; + } + set + { + this.taskDetails = value; + } + } + + /// + /// Gets the task details. + /// + /// + ObservableCollection GetTaskDetails() + { + var taskDetails = new ObservableCollection(); + + // Collection to Strore the Required Resources. + ObservableCollection ResidentialConstructionResources = new ObservableCollection(); + ResidentialConstructionResources = GetResources(); + + // Adding Tasks + + taskDetails.Add(new Task() { ID = 1, Name = "Residential Construction (2500 sq.ft)", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 15), BaselineStart = new DateTime(2012, 3, 1), BaselineEnd = new DateTime(2012, 3, 14), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 2, Name = "General Considerations", StartDate = new DateTime(2012, 7, 3), EndDate = new DateTime(2012, 7, 14), BaselineStart = new DateTime(2012, 7, 3), BaselineEnd = new DateTime(2012, 7, 14), Progress = 0d, Cost = 89, BaselineCost = 833d, }); + + taskDetails[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 3, Name = "Finalize and Approve Plans", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 15), BaselineStart = new DateTime(2012, 3, 2), BaselineEnd = new DateTime(2012, 3, 16), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 4, Name = "Review and Finalize Site Plans", StartDate = new DateTime(2012, 3, 1), EndDate = new DateTime(2012, 3, 20), BaselineStart = new DateTime(2012, 3, 1), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 5, Name = "Sign contract and Proceed", StartDate = new DateTime(2012, 3, 20), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 19), BaselineEnd = new DateTime(2012, 3, 21), Progress = 0d, Cost = 500, BaselineCost = 833d, }); + + taskDetails[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 6, Name = "Contracts and Agreements", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 21), Progress = 0d, Cost = 20d, BaselineCost = 14 }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 7, Name = "Lot Sale Agreement", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 20d, BaselineCost = 14 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 8, Name = "Construction Agreement", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 21), BaselineEnd = new DateTime(2012, 3, 21), Progress = 0d, Cost = 33d, BaselineCost = 12 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 9, Name = "Contract Specifications", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 30d, BaselineCost = 50 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 10, Name = "Contract Site Plan", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 360d, BaselineCost = 100 })); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection.Add((new Task() { ID = 11, Name = "Financing", StartDate = new DateTime(2012, 3, 22), EndDate = new DateTime(2012, 3, 22), BaselineStart = new DateTime(2012, 3, 20), BaselineEnd = new DateTime(2012, 3, 20), Progress = 0d, Cost = 39d, BaselineCost = 16 })); + + taskDetails[0].ChildCollection[0].ChildCollection.Add(new Task() { ID = 12, Name = "Apply Permits", StartDate = new DateTime(2012, 3, 23), EndDate = new DateTime(2012, 3, 24), BaselineStart = new DateTime(2012, 3, 22), BaselineEnd = new DateTime(2012, 3, 23), Progress = 0d, Cost = 53d, BaselineCost = 65 }); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection.Add((new Task() { ID = 13, Name = "Foundation Permit", StartDate = new DateTime(2012, 3, 23), EndDate = new DateTime(2012, 3, 24), BaselineStart = new DateTime(2012, 3, 22), BaselineEnd = new DateTime(2012, 3, 23), Progress = 0d, Cost = 53d, BaselineCost = 65 })); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection.Add((new Task() { ID = 14, Name = "Electrical Permit", StartDate = new DateTime(2012, 3, 24), EndDate = new DateTime(2012, 3, 25), BaselineStart = new DateTime(2012, 3, 24), BaselineEnd = new DateTime(2012, 3, 25), Progress = 0d, Cost = 23d, BaselineCost = 34 })); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection.Add((new Task() { ID = 15, Name = "Plumbing Permit", StartDate = new DateTime(2012, 3, 25), EndDate = new DateTime(2012, 3, 26), BaselineStart = new DateTime(2012, 3, 25), BaselineEnd = new DateTime(2012, 3, 26), Progress = 0d, Cost = 63d, BaselineCost = 53 })); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 16, Name = "Site Work", StartDate = new DateTime(2012, 3, 26), EndDate = new DateTime(2012, 3, 27), BaselineStart = new DateTime(2012, 3, 26), BaselineEnd = new DateTime(2012, 3, 27), Progress = 0d, Cost = 2000d, BaselineCost = 1000 }); + taskDetails[0].ChildCollection[1].ChildCollection.Add(new Task() { ID = 17, Name = "Clear Lot", StartDate = new DateTime(2012, 3, 26), EndDate = new DateTime(2012, 3, 27), BaselineStart = new DateTime(2012, 3, 27), BaselineEnd = new DateTime(2012, 3, 28), Progress = 0d, Cost = 2000d, BaselineCost = 1000 }); + taskDetails[0].ChildCollection[1].ChildCollection.Add(new Task() { ID = 18, Name = "Strip Topsoil", StartDate = new DateTime(2012, 3, 27), EndDate = new DateTime(2012, 3, 28), BaselineStart = new DateTime(2012, 3, 27), BaselineEnd = new DateTime(2012, 3, 28), Progress = 0d, Cost = 1200d, BaselineCost = 800 }); + taskDetails[0].ChildCollection[1].ChildCollection.Add(new Task() { ID = 19, Name = "Installing Temporary requirements", StartDate = new DateTime(2012, 3, 28), EndDate = new DateTime(2012, 3, 29), BaselineStart = new DateTime(2012, 3, 30), BaselineEnd = new DateTime(2012, 4, 2), Progress = 0d, Cost = 354d, BaselineCost = 230 }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 20, Name = "Foundation", StartDate = new DateTime(2012, 3, 29), EndDate = new DateTime(2012, 4, 2), BaselineStart = new DateTime(2012, 3, 29), BaselineEnd = new DateTime(2012, 4, 2), Progress = 0d, Cost = 899, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 21, Name = "Excavate for foundation", StartDate = new DateTime(2012, 3, 29), EndDate = new DateTime(2012, 4, 2), BaselineStart = new DateTime(2012, 3, 29), BaselineEnd = new DateTime(2012, 4, 2), Progress = 0d, Cost = 899, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 22, Name = "Building Basement Walls", StartDate = new DateTime(2012, 4, 3), EndDate = new DateTime(2012, 4, 8), BaselineStart = new DateTime(2012, 4, 3), BaselineEnd = new DateTime(2012, 4, 8), Progress = 0d, Cost = 889, BaselineCost = 803d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 23, Name = "Foundation inspection", StartDate = new DateTime(2012, 4, 8), EndDate = new DateTime(2012, 4, 10), BaselineStart = new DateTime(2012, 4, 7), BaselineEnd = new DateTime(2012, 4, 9), Progress = 0d, Cost = 8, BaselineCost = 8d, }); + taskDetails[0].ChildCollection[2].ChildCollection.Add(new Task() { ID = 24, Name = "Finishing Foundation", StartDate = new DateTime(2012, 4, 10), EndDate = new DateTime(2012, 4, 17), BaselineStart = new DateTime(2012, 4, 10), BaselineEnd = new DateTime(2012, 4, 17), Progress = 0d, Cost = 0, BaselineCost = 8d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 25, Name = "Framing", StartDate = new DateTime(2012, 4, 18), EndDate = new DateTime(2012, 4, 24), BaselineStart = new DateTime(2012, 4, 18), BaselineEnd = new DateTime(2012, 4, 24), Progress = 0d, Cost = 890, BaselineCost = 803d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 26, Name = "First Floor Framing", StartDate = new DateTime(2012, 4, 18), EndDate = new DateTime(2012, 4, 24), BaselineStart = new DateTime(2012, 4, 17), BaselineEnd = new DateTime(2012, 4, 23), Progress = 0d, Cost = 890, BaselineCost = 803d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 27, Name = "Second Floor Framing", StartDate = new DateTime(2012, 4, 24), EndDate = new DateTime(2012, 5, 3), BaselineStart = new DateTime(2012, 4, 24), BaselineEnd = new DateTime(2012, 5, 3), Progress = 0d, Cost = 789, BaselineCost = 898d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 28, Name = "Framing Roof", StartDate = new DateTime(2012, 5, 3), EndDate = new DateTime(2012, 5, 7), BaselineStart = new DateTime(2012, 5, 4), BaselineEnd = new DateTime(2012, 5, 8), Progress = 0d, Cost = 780, BaselineCost = 833d, }); + taskDetails[0].ChildCollection[3].ChildCollection.Add(new Task() { ID = 29, Name = "Framing Inspection", StartDate = new DateTime(2012, 5, 7), EndDate = new DateTime(2012, 5, 8), BaselineStart = new DateTime(2012, 5, 7), BaselineEnd = new DateTime(2012, 5, 8), Progress = 0d, Cost = 5, BaselineCost = 8d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 30, Name = "Dry In", StartDate = new DateTime(2012, 5, 8), EndDate = new DateTime(2012, 5, 14), BaselineStart = new DateTime(2012, 5, 8), BaselineEnd = new DateTime(2012, 5, 15), Progress = 0d, Cost = 232, BaselineCost = 323d, }); + taskDetails[0].ChildCollection[4].ChildCollection.Add(new Task() { ID = 31, Name = "Installing Sheathing for floors", StartDate = new DateTime(2012, 5, 8), EndDate = new DateTime(2012, 5, 14), BaselineStart = new DateTime(2012, 5, 9), BaselineEnd = new DateTime(2012, 5, 15), Progress = 0d, Cost = 232, BaselineCost = 323d, }); + taskDetails[0].ChildCollection[4].ChildCollection.Add(new Task() { ID = 32, Name = "Installing Windows", StartDate = new DateTime(2012, 5, 14), EndDate = new DateTime(2012, 5, 25), BaselineStart = new DateTime(2012, 5, 14), BaselineEnd = new DateTime(2012, 5, 25), Progress = 0d, Cost = 325, BaselineCost = 452d, }); + taskDetails[0].ChildCollection[4].ChildCollection.Add(new Task() { ID = 33, Name = "Installing Sheathing for Roof", StartDate = new DateTime(2012, 5, 25), EndDate = new DateTime(2012, 5, 30), BaselineStart = new DateTime(2012, 5, 23), BaselineEnd = new DateTime(2012, 5, 30), Progress = 0d, Cost = 82, BaselineCost = 83d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 34, Name = "Exterior Finishing", StartDate = new DateTime(2012, 5, 31), EndDate = new DateTime(2012, 6, 12), BaselineStart = new DateTime(2012, 5, 31), BaselineEnd = new DateTime(2012, 6, 12), Progress = 0d, Cost = 463, BaselineCost = 633d, }); + taskDetails[0].ChildCollection[5].ChildCollection.Add(new Task() { ID = 35, Name = "Exterior Trimming", StartDate = new DateTime(2012, 5, 31), EndDate = new DateTime(2012, 6, 12), BaselineStart = new DateTime(2012, 5, 31), BaselineEnd = new DateTime(2012, 6, 12), Progress = 0d, Cost = 463, BaselineCost = 633d, }); + taskDetails[0].ChildCollection[5].ChildCollection.Add(new Task() { ID = 36, Name = "Completing Exterior Bricks", StartDate = new DateTime(2012, 6, 12), EndDate = new DateTime(2012, 6, 17), BaselineStart = new DateTime(2012, 6, 12), BaselineEnd = new DateTime(2012, 6, 17), Progress = 0d, Cost = 234, BaselineCost = 333d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 37, Name = "Interior Finishing", StartDate = new DateTime(2012, 6, 17), EndDate = new DateTime(2012, 6, 19), BaselineStart = new DateTime(2012, 6, 17), BaselineEnd = new DateTime(2012, 6, 19), Progress = 0d, Cost = 43, BaselineCost = 33d, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 38, Name = "Installing Insulation", StartDate = new DateTime(2012, 6, 17), EndDate = new DateTime(2012, 6, 19), BaselineStart = new DateTime(2012, 6, 17), BaselineEnd = new DateTime(2012, 6, 19), Progress = 0d, Cost = 43, BaselineCost = 33d, }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 39, Name = "Install Floor Insulation", StartDate = new DateTime(2012, 6, 17), EndDate = new DateTime(2012, 6, 19), BaselineStart = new DateTime(2012, 6, 17), BaselineEnd = new DateTime(2012, 6, 19), Progress = 0d, Cost = 43, BaselineCost = 33d, }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 40, Name = "Install Wall Insulation", StartDate = new DateTime(2012, 6, 19), EndDate = new DateTime(2012, 6, 21), BaselineStart = new DateTime(2012, 6, 19), BaselineEnd = new DateTime(2012, 6, 21), Progress = 0d, Cost = 53, BaselineCost = 83d, }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection.Add(new Task() { ID = 41, Name = "Install Ceiling Insulation", StartDate = new DateTime(2012, 6, 21), EndDate = new DateTime(2012, 6, 22), BaselineStart = new DateTime(2012, 6, 21), BaselineEnd = new DateTime(2012, 6, 22), Progress = 0d, Cost = 89, BaselineCost = 83d, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 42, Name = "Painting and Wallpaper", StartDate = new DateTime(2012, 6, 22), EndDate = new DateTime(2012, 6, 23), BaselineStart = new DateTime(2012, 6, 22), BaselineEnd = new DateTime(2012, 6, 23), Progress = 0d, Cost = 453, BaselineCost = 563, }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 43, Name = "Painting all Interior", StartDate = new DateTime(2012, 6, 22), EndDate = new DateTime(2012, 6, 23), BaselineStart = new DateTime(2012, 6, 22), BaselineEnd = new DateTime(2012, 6, 23), Progress = 0d, Cost = 453, BaselineCost = 563, }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 44, Name = "Painting all Exterior", StartDate = new DateTime(2012, 6, 23), EndDate = new DateTime(2012, 6, 25), BaselineStart = new DateTime(2012, 6, 23), BaselineEnd = new DateTime(2012, 6, 25), Progress = 0d, Cost = 352, BaselineCost = 342, }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection.Add(new Task() { ID = 45, Name = "Additional Trimming Work", StartDate = new DateTime(2012, 6, 25), EndDate = new DateTime(2012, 6, 27), BaselineStart = new DateTime(2012, 6, 25), BaselineEnd = new DateTime(2012, 6, 27), Progress = 0d, Cost = 32, BaselineCost = 50, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 46, Name = "Finishing Plumbing", StartDate = new DateTime(2012, 6, 27), EndDate = new DateTime(2012, 6, 29), BaselineStart = new DateTime(2012, 6, 27), BaselineEnd = new DateTime(2012, 6, 29), Progress = 0d, Cost = 424, BaselineCost = 423, }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection.Add(new Task() { ID = 47, Name = "First floor Plumbing", StartDate = new DateTime(2012, 6, 27), EndDate = new DateTime(2012, 6, 29), BaselineStart = new DateTime(2012, 6, 27), BaselineEnd = new DateTime(2012, 6, 29), Progress = 0d, Cost = 424, BaselineCost = 423, }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection.Add(new Task() { ID = 48, Name = "Second floor plumbing", StartDate = new DateTime(2012, 6, 29), EndDate = new DateTime(2012, 7, 1), BaselineStart = new DateTime(2012, 6, 29), BaselineEnd = new DateTime(2012, 7, 1), Progress = 0d, Cost = 234, BaselineCost = 324, }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection.Add(new Task() { ID = 49, Name = "Inspecting Plumbing", StartDate = new DateTime(2012, 7, 1), EndDate = new DateTime(2012, 7, 3), BaselineStart = new DateTime(2012, 7, 1), BaselineEnd = new DateTime(2012, 7, 3), Progress = 0d, Cost = 23, BaselineCost = 33d, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 50, Name = "Finishing Electrical", StartDate = new DateTime(2012, 7, 3), EndDate = new DateTime(2012, 7, 5), BaselineStart = new DateTime(2012, 7, 3), BaselineEnd = new DateTime(2012, 7, 5), Progress = 0d, Cost = 432, BaselineCost = 536, }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection.Add(new Task() { ID = 51, Name = "Progress first floor connections", StartDate = new DateTime(2012, 7, 3), EndDate = new DateTime(2012, 7, 5), BaselineStart = new DateTime(2012, 7, 3), BaselineEnd = new DateTime(2012, 7, 5), Progress = 0d, Cost = 432, BaselineCost = 536, }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection.Add(new Task() { ID = 52, Name = "Progress second floor connections", StartDate = new DateTime(2012, 7, 5), EndDate = new DateTime(2012, 7, 7), BaselineStart = new DateTime(2012, 7, 4), BaselineEnd = new DateTime(2012, 7, 6), Progress = 0d, Cost = 563, BaselineCost = 463, }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection.Add(new Task() { ID = 53, Name = "Progress non-Electrical Wiring", StartDate = new DateTime(2012, 7, 7), EndDate = new DateTime(2012, 7, 8), BaselineStart = new DateTime(2012, 7, 7), BaselineEnd = new DateTime(2012, 7, 8), Progress = 0d, Cost = 234, BaselineCost = 563, }); + + taskDetails[0].ChildCollection[6].ChildCollection.Add(new Task() { ID = 54, Name = "Carpet,Tiles and Furnishing", StartDate = new DateTime(2012, 7, 8), EndDate = new DateTime(2012, 7, 10), BaselineStart = new DateTime(2012, 7, 9), BaselineEnd = new DateTime(2012, 7, 11), Progress = 0d, Cost = 253, BaselineCost = 210, }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection.Add(new Task() { ID = 55, Name = "Progress first floor carpet", StartDate = new DateTime(2012, 7, 8), EndDate = new DateTime(2012, 7, 10), BaselineStart = new DateTime(2012, 7, 8), BaselineEnd = new DateTime(2012, 7, 10), Progress = 0d, Cost = 253, BaselineCost = 210, }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection.Add(new Task() { ID = 56, Name = "Progress second floor carpet", StartDate = new DateTime(2012, 7, 10), EndDate = new DateTime(2012, 7, 13), BaselineStart = new DateTime(2012, 7, 10), BaselineEnd = new DateTime(2012, 7, 13), Progress = 0d, Cost = 341, BaselineCost = 300, }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection.Add(new Task() { ID = 57, Name = "Progress Furnishing Kitchen, bath, hall", StartDate = new DateTime(2012, 7, 13), EndDate = new DateTime(2012, 7, 14), BaselineStart = new DateTime(2012, 7, 13), BaselineEnd = new DateTime(2012, 7, 14), Progress = 0, Cost = 4252, BaselineCost = 6033d, }); + + taskDetails[0].ChildCollection.Add(new Task() { ID = 58, Name = "Final Acceptance", StartDate = new DateTime(2012, 7, 14), EndDate = new DateTime(2012, 7, 16), BaselineStart = new DateTime(2012, 7, 14), BaselineEnd = new DateTime(2012, 7, 16), Progress = 0d, Cost = 430, BaselineCost = 433d, }); + taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 59, Name = "Cleaning", StartDate = new DateTime(2012, 7, 14), EndDate = new DateTime(2012, 7, 16), BaselineStart = new DateTime(2012, 7, 14), BaselineEnd = new DateTime(2012, 7, 16), Progress = 0d, Cost = 430, BaselineCost = 433d, }); + taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 60, Name = "Final Inspection", StartDate = new DateTime(2012, 7, 16), EndDate = new DateTime(2012, 7, 17), BaselineStart = new DateTime(2012, 7, 16), BaselineEnd = new DateTime(2012, 7, 17), Progress = 0d, Cost = 0, BaselineCost = 5, }); + taskDetails[0].ChildCollection[7].ChildCollection.Add(new Task() { ID = 61, Name = "Move In", StartDate = new DateTime(2012, 7, 17), EndDate = new DateTime(2012, 7, 17), BaselineStart = new DateTime(2012, 7, 18), BaselineEnd = new DateTime(2012, 7, 18), Progress = 0d, Cost = 0, BaselineCost = 0, }); + + //Adding Resources + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[1]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[0]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[2]); + + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[0]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[1]); + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[2]); + + taskDetails[0].ChildCollection[1].ChildCollection[0].Resource.Add(ResidentialConstructionResources[3]); + taskDetails[0].ChildCollection[1].ChildCollection[1].Resource.Add(ResidentialConstructionResources[3]); + taskDetails[0].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[5]); + taskDetails[0].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[6]); + taskDetails[0].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[4]); + + taskDetails[0].ChildCollection[2].ChildCollection[0].Resource.Add(ResidentialConstructionResources[3]); + taskDetails[0].ChildCollection[2].ChildCollection[1].Resource.Add(ResidentialConstructionResources[6]); + taskDetails[0].ChildCollection[2].ChildCollection[2].Resource.Add(ResidentialConstructionResources[7]); + taskDetails[0].ChildCollection[2].ChildCollection[3].Resource.Add(ResidentialConstructionResources[3]); + + taskDetails[0].ChildCollection[3].ChildCollection[0].Resource.Add(ResidentialConstructionResources[8]); + taskDetails[0].ChildCollection[3].ChildCollection[1].Resource.Add(ResidentialConstructionResources[8]); + taskDetails[0].ChildCollection[3].ChildCollection[2].Resource.Add(ResidentialConstructionResources[9]); + taskDetails[0].ChildCollection[3].ChildCollection[3].Resource.Add(ResidentialConstructionResources[7]); + + taskDetails[0].ChildCollection[4].ChildCollection[0].Resource.Add(ResidentialConstructionResources[8]); + taskDetails[0].ChildCollection[4].ChildCollection[1].Resource.Add(ResidentialConstructionResources[9]); + taskDetails[0].ChildCollection[4].ChildCollection[2].Resource.Add(ResidentialConstructionResources[8]); + + taskDetails[0].ChildCollection[5].ChildCollection[0].Resource.Add(ResidentialConstructionResources[14]); + taskDetails[0].ChildCollection[5].ChildCollection[1].Resource.Add(ResidentialConstructionResources[8]); + + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[0].Resource.Add(ResidentialConstructionResources[10]); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[1].Resource.Add(ResidentialConstructionResources[10]); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[2].Resource.Add(ResidentialConstructionResources[10]); + + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[0].Resource.Add(ResidentialConstructionResources[12]); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[1].Resource.Add(ResidentialConstructionResources[12]); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[2].Resource.Add(ResidentialConstructionResources[12]); + + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[0].Resource.Add(ResidentialConstructionResources[5]); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[1].Resource.Add(ResidentialConstructionResources[5]); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[2].Resource.Add(ResidentialConstructionResources[7]); + + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[0].Resource.Add(ResidentialConstructionResources[4]); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[1].Resource.Add(ResidentialConstructionResources[4]); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[2].Resource.Add(ResidentialConstructionResources[4]); + + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[0].Resource.Add(ResidentialConstructionResources[13]); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[1].Resource.Add(ResidentialConstructionResources[13]); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[2].Resource.Add(ResidentialConstructionResources[14]); + + taskDetails[0].ChildCollection[7].ChildCollection[0].Resource.Add(ResidentialConstructionResources[16]); + taskDetails[0].ChildCollection[7].ChildCollection[1].Resource.Add(ResidentialConstructionResources[7]); + taskDetails[0].ChildCollection[7].ChildCollection[2].Resource.Add(ResidentialConstructionResources[1]); + + //Adding Predecessors + taskDetails[0].ChildCollection[0].ChildCollection[0].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 4, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[1].ChildCollection[4].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + taskDetails[0].ChildCollection[0].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 5, GanttTaskRelationship = GanttTaskRelationship.FinishToFinish }); + + taskDetails[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 13, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 14, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 15, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 17, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[2].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 19, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[2].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 21, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 19, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[2].ChildCollection[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 23, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[3].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 24, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[3].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 26, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[3].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 27, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[3].ChildCollection[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 28, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[4].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 29, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[4].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 31, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[4].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 32, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[5].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 33, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[5].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 35, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 36, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 39, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[0].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 40, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 41, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 43, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 44, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[1].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 43, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 45, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 47, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[2].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 48, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 49, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 48, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 51, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[3].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 52, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 53, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 55, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[6].ChildCollection[4].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 56, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + taskDetails[0].ChildCollection[7].ChildCollection[0].Predecessor.Add(new Predecessor() { GanttTaskIndex = 57, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[7].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 59, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + taskDetails[0].ChildCollection[7].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 60, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); + + return taskDetails; + } + + /// + /// Gets the resources. + /// + /// + private static ObservableCollection GetResources() + { + ObservableCollection Resources = new ObservableCollection(); + Resources.Add(new Resource() { ID = 1, Name = "General Contractor" }); + Resources.Add(new Resource() { ID = 2, Name = "Owner" }); + Resources.Add(new Resource() { ID = 3, Name = "Architect" }); + Resources.Add(new Resource() { ID = 4, Name = "Site Excavation Contractor" }); + Resources.Add(new Resource() { ID = 5, Name = "Electrical Contractor" }); + Resources.Add(new Resource() { ID = 6, Name = "Plumbing Contractor" }); + Resources.Add(new Resource() { ID = 7, Name = "Concrete Contractor" }); + Resources.Add(new Resource() { ID = 8, Name = "Inspector" }); + Resources.Add(new Resource() { ID = 9, Name = "Framing Contractor" }); + Resources.Add(new Resource() { ID = 10, Name = "Roofing Contractor" }); + Resources.Add(new Resource() { ID = 11, Name = "Insulation Contractor" }); + Resources.Add(new Resource() { ID = 12, Name = "Drywall contractor" }); + Resources.Add(new Resource() { ID = 13, Name = "Painting Contractor" }); + Resources.Add(new Resource() { ID = 14, Name = "Flooring Contractor" }); + Resources.Add(new Resource() { ID = 15, Name = "Appliance Contractor" }); + Resources.Add(new Resource() { ID = 16, Name = "Masonry Contractor" }); + Resources.Add(new Resource() { ID = 17, Name = "MaID Service" }); + + return Resources; + } +} + +{% endhighlight %} {% endtabs %} Sample Project Statistic Visual: diff --git a/wpf/Gantt/calendar-customization.md b/wpf/Gantt/calendar-customization.md index 9fc4fea083..89bee827b9 100644 --- a/wpf/Gantt/calendar-customization.md +++ b/wpf/Gantt/calendar-customization.md @@ -29,63 +29,63 @@ Data Type Reference links -WeekBeginsOn +[WeekBeginsOn](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_WeekBeginsOn) Gets or sets the starting day of a week in the project schedule. By default it is set to Sunday. DependencyProperty Enum N/A -FiscalYearBeginsOn +[FiscalYearBeginsOn](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_FiscalYearBeginsOn) Gets or sets the starting month of a fiscal year. By default it is set to January DependencyProperty Enum N/A -IsFYNumberingEnabled +[IsFYNumberingEnabled](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_IsFiscalYearNumberingEnabled) Gets or sets the Fiscal Year Numbering. If this property is changed, it will be reflected in the schedule.By default FY Numbering is set to false. Dependency Property bool N/A -DefaultStartTime +[DefaultStartTime](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_DefaultStartTime) Gets or sets the task starting time in a day. This is based on the {{ '_GanttTime_' | markdownify }} class of the Gantt control.By default this is set to 9.00 AM Dependency Property GanttTime N/A -DefaultEndTime +[DefaultEndTime](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_DefaultEndTime) Gets or sets the task ending time in a day. This is based on the {{ '_GanttTime_' | markdownify }} class of the Gantt control.By default this is set to 6.00 PM Dependency Property GanttTime N/A -Weekends +[Weekends](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_Weekends) Gets or sets the weekend days. Default value is Saturday, Sunday. Dependency Property Days N/A -ShowWeekends +[ShowWeekends](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ShowWeekends) Enables or disables the weekend days in schedule. Default value is true. Dependency Property bool N/A -ExcludeWeekends +[ExcludeWeekends](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ExcludeWeekends) Excludes or includes the weekend days in duration calculation. Default value is false. Dependency Property bool N/A -ShowNonWorkingHoursBackground +[ShowNonWorkingHoursBackground](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ShowNonWorkingHoursBackground) Enables or disables the background for weekend days. Default value is true. Dependency Property bool @@ -211,11 +211,11 @@ public class ViewModel { get { - return defaultstart; + return this.defaultstart; } set { - defaultstart = value; + this.defaultstart = value; } } @@ -227,11 +227,11 @@ public class ViewModel { get { - return defaultend; + return this.defaultend; } set { - defaultend = value; + this.defaultend = value; } } @@ -243,11 +243,11 @@ public class ViewModel { get { - return fynumbering; + return this.fynumbering; } set { - fynumbering = value; + this.fynumbering = value; } } @@ -316,11 +316,11 @@ public class ViewModel { get { - return _taskCollection; + return this._taskCollection; } set { - _taskCollection = value; + this._taskCollection = value; } } @@ -353,7 +353,6 @@ public class ViewModel taskDetails[0].Child = MarketAnalysis; - taskDetails.Add(new TaskDetails { StartDate = new DateTime(2010, 6, 18), FinishDate = new DateTime(2010, 7, 14), TaskName = "Infrastructure for Product Planning", TaskId = 9 }); ObservableCollection InfrastructureReq = new ObservableCollection(); InfrastructureReq.Add(new TaskDetails { StartDate = new DateTime(2010, 6, 18), FinishDate = new DateTime(2010, 6, 24), TaskName = "Define procedure for qualifying ideas", TaskId = 10 }); @@ -380,7 +379,6 @@ public class ViewModel Product[5].Predecessor.Add(new Predecessor { GanttTaskIndex = 17, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); Product[5].Predecessor.Add(new Predecessor { GanttTaskIndex = 18, GanttTaskRelationship = GanttTaskRelationship.FinishToStart }); - taskDetails[2].Child = Product; taskDetails.Add(new TaskDetails { StartDate = new DateTime(2010, 9, 2), FinishDate = new DateTime(2010, 9, 10), TaskName = "Analysing Customer Requirement", TaskId = 20 }); diff --git a/wpf/Gantt/custom-node-style.md b/wpf/Gantt/custom-node-style.md index b2e6de0076..6a2636ce97 100644 --- a/wpf/Gantt/custom-node-style.md +++ b/wpf/Gantt/custom-node-style.md @@ -9,7 +9,7 @@ documentation: ug # Custom Node Style in WPF Gantt -Custom node style enables you to design your own style to the nodes that will be displayed in the Gantt. You can also customize the progress bar of the Task Node.Currently Gantt Control supports three types of node. They are: +Custom node style enables you to design your own style to the nodes that will be displayed in the Gantt. You can also customize the progress bar of the Task Node.Currently [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) supports three types of node. They are: * Header Node * Task Node diff --git a/wpf/Gantt/custom-schedule.md b/wpf/Gantt/custom-schedule.md index c9ee4eee95..a61c33d8b2 100644 --- a/wpf/Gantt/custom-schedule.md +++ b/wpf/Gantt/custom-schedule.md @@ -20,15 +20,15 @@ These types are included in the existing ScheduleType enum. ## Custom Numeric -Custom Numeric schedule is used to define your own schedule with any numeric measurement unit other than date time. With this schedule, you can track the progress based on your own measurement and there is no need to depend on Date Time. Two new API’s are added to the Mapping attributes to support this schedule in GanttChart and GanttGrid. +Custom Numeric schedule is used to define your own schedule with any numeric measurement unit other than date time. With this schedule, you can track the progress based on your own measurement and there is no need to depend on Date Time. Two new API’s are added to the Mapping attributes to support this schedule in [GanttChart](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttChart.html) and [GanttGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttGrid.html). ## Custom DateTime Custom DateTime schedule is used to define your own date time schedule, which can match your current financial calendar. By using schedule type as custom schedule, you can define your schedule on quarterly basis. -In both the custom schedules, Gantt will get the information from the application to render the schedule. Gantt will accept the custom schedule information in the form of a collection of GanttScheduleRowInfo object, and process it to draw the schedule. +In both the custom schedules, Gantt will get the information from the application to render the schedule. Gantt will accept the custom schedule information in the form of a collection of [GanttScheduleRowInfo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttScheduleRowInfo.html) object, and process it to draw the schedule. -GanttScheduleRowInfo class will have following fields: +[GanttScheduleRowInfo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttScheduleRowInfo.html) class will have following fields: 1. PixelsPerUnit—Gets the information of the pixel value equivalent to one unit in custom measurement. 2. CellsPerUnit—Gets the information of a cell size of preceding row in the schedule based on the immediate next row. In CustomDateTime Schedule, the CellsPerUnit will be used to customize the cell. For example, in quarterly basis month cell, You need to draw a schedule by consolidating three months. For this, you need to define the CellsPerUnit of that corresponding row as 3. @@ -61,7 +61,7 @@ Type Data Type -CustomScheduleSource +[CustomScheduleSource](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_CustomScheduleSource) Gets/Sets the custom schedule items Source of the Gantt. DependencyProperty IList<GanttScheduleRowInfo> @@ -78,7 +78,7 @@ Arguments Type -ScheduleCellCreated +[ScheduleCellCreated](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ScheduleCellCreated) Event will be triggered whenever a schedule cell is created. The handler of the event will have the newly created cell (GanttScheduleCell) in the argument.By handling this event, you can customize the appearance of the cell. ScheduleCellCreated (object sender, ScheduleCellCreatedEventArgs args) Routed Event @@ -99,25 +99,25 @@ Type Data Type -CellDate +[CellDate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttScheduleCell.html#Syncfusion_Windows_Controls_Gantt_GanttScheduleCell_CellDate) Gets/Sets the current schedule cell date in the datetime schedule. Dependency Property DateTime -CellToolTip +[CellToolTip](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttScheduleCell.html#Syncfusion_Windows_Controls_Gantt_GanttScheduleCell_CellToolTip) Gets/Sets the current schedule cell tool tip. Dependency Property Object -CellTimeUnit +[CellTimeUnit](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttScheduleCell.html#Syncfusion_Windows_Controls_Gantt_GanttScheduleCell_CellTimeUnit) Gets/Sets the current schedule row time unit (like weeks, months and so on). Dependency Property TimeUnit (Enum) -Content +`Content` Gets/Sets the current schedule cell content. Dependency Property Object @@ -127,9 +127,9 @@ Object To Add CustomNumeric Schedule to an application: -1. Define the Mapping for StartPointMapping and FinishPointMapping in TaskAttributeMapping. -1. Set the Gantt Schedule type as CustomNumeric. -2. Bind the GanttScheduleRowInfo collection to the CustomScheduleSource property of the Gantt. +1. Define the Mapping for [StartPointMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html#Syncfusion_Windows_Controls_Gantt_TaskAttributeMapping_StartPointMapping) and [FinishPointMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html#Syncfusion_Windows_Controls_Gantt_TaskAttributeMapping_FinishPointMapping) in [TaskAttributeMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html). +1. Set the Gantt [ScheduleType](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ScheduleType) as CustomNumeric. +2. Bind the [GanttScheduleRowInfo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttScheduleRowInfo.html) collection to the [CustomScheduleSource](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_CustomScheduleSource) property of the Gantt. The following code illustrates Adding Custom Schedule to an Application: @@ -756,8 +756,8 @@ To view samples: To Add CustomDateTime Schedule to an application: -1. Define the Gantt Schedule type as CustomDateTime. -2. Bind the GanttScheduleRowInfo collection to the CustomScheduleSource property of the Gantt. +1. Define the Gantt [ScheduleType](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ScheduleType) as CustomDateTime. +2. Bind the [GanttScheduleRowInfo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttScheduleRowInfo.html) collection to the [CustomScheduleSource](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_CustomScheduleSource) property of the Gantt. The following code illustrates this: diff --git a/wpf/Gantt/custom-tooltip.md b/wpf/Gantt/custom-tooltip.md index 90168646d2..7681ff9261 100644 --- a/wpf/Gantt/custom-tooltip.md +++ b/wpf/Gantt/custom-tooltip.md @@ -23,7 +23,7 @@ Type Data Type -ToolTipTemplate +[ToolTipTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ToolTipTemplate) Gets or set the TaskBarCollection Property of GanttControl Dependency Property DataTemplate @@ -410,7 +410,6 @@ public class ViewModel taskDetails[3].ChildCollection.Add((new Task() { ID = 20, Name = "Modify items as necessary", StartDate = new DateTime(2011, 8, 2), EndDate = new DateTime(2011, 8, 8), Progress = 20d })); taskDetails[3].ChildCollection.Add((new Task() { ID = 21, Name = "Post Implementation Progress", StartDate = new DateTime(2011, 8, 8), EndDate = new DateTime(2011, 8, 12), Progress = 30d })); - taskDetails[0].ChildCollection[1].Predecessor.Add(new Predecessor() { GanttTaskIndex = 2, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); taskDetails[0].ChildCollection[2].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); taskDetails[0].ChildCollection[3].Predecessor.Add(new Predecessor() { GanttTaskIndex = 3, GanttTaskRelationship = GanttTaskRelationship.StartToStart }); diff --git a/wpf/Gantt/data-binding.md b/wpf/Gantt/data-binding.md index 918976272a..b1c6beefec 100644 --- a/wpf/Gantt/data-binding.md +++ b/wpf/Gantt/data-binding.md @@ -11,13 +11,13 @@ documentation: ug ## TaskDetails Binding -Essential Gantt for WPF includes an built-in class called TaskDetails, which is inherited from the IGanttTask interface. A collection of the TaskDetails can be bounded as an ItemsSource for the GanttControl. +Essential Gantt for WPF includes an built-in class called [TaskDetails](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskDetails.html), which is inherited from the [IGanttTask](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.IGanttTask.html) interface. A collection of the [TaskDetails](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskDetails.html) can be bounded as an ItemsSource for the [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html). #### Use Case Scenarios -You can easily create the task details collection using the TaskDetails class or by creating a new class by inheriting the IGantt interface. +You can easily create the task details collection using the TaskDetails class or by creating a new class by inheriting the [IGanttTask](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.IGanttTask.html) interface. -Binding TaskDetails collection to Gantt Control +Binding [TaskDetails](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskDetails.html) collection to Gantt Control The following code illustrates how to bind the Task Details to the Gantt Control: @@ -82,7 +82,7 @@ public class ViewModel { get { - return taskDetails; + return this.taskDetails; } set { @@ -104,7 +104,6 @@ public class ViewModel taskDetails[0].Child.Add(new TaskDetails { TaskId = 5, TaskName = "Secure complete", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 14), Progress = 20d }); taskDetails.Add(new TaskDetails { TaskId = 6, TaskName = "Risk Assessment", StartDate = new DateTime(2011, 7, 8), FinishDate = new DateTime(2011, 7, 24), Progress = 30d }); - taskDetails[1].Child.Add(new TaskDetails { TaskId = 7, TaskName = "Perform risk assessment", StartDate = new DateTime(2011, 7, 8), FinishDate = new DateTime(2011, 7, 21), Progress = 20d }); taskDetails[1].Child.Add(new TaskDetails { TaskId = 8, TaskName = "Evaluate risk assessment", StartDate = new DateTime(2011, 7, 8), FinishDate = new DateTime(2011, 7, 23), Progress = 30d }); taskDetails[1].Child.Add(new TaskDetails { TaskId = 9, TaskName = "Prepare contingency plans", StartDate = new DateTime(2011, 7, 12), FinishDate = new DateTime(2011, 7, 24), Progress = 30d }); @@ -151,9 +150,10 @@ To view samples: ## External Property Binding -Essential Gantt for WPF allow you to bind any type of IEnumerable source to Gantt.You can bind any collection to Gantt using the TaskAttributeMapping class. This will get the mapping name of the required fields from the underlying source. With this mapping the Gantt will get the required information to render the Chart nodes. +Essential Gantt for WPF allows you to bind any type of IEnumerable source to Gantt. You can bind any collection to Gantt using the [TaskAttributeMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html) class. This will get the mapping name of the required fields from the underlying source. With this mapping the Gantt will get the required information to render the Chart nodes. + +The following code illustrate how to map the properties using the [TaskAttributeMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html) class: -The following code illustrate how to map the properties using the TaskAttributeMapping class: {% tabs %} {% highlight xaml %} @@ -178,7 +178,6 @@ The following code illustrate how to map the properties using the TaskAttributeM {% endhighlight %} {% highlight c# %} - this.ganttControl.ItemsSource = new ViewModel().TaskDetails; // Task attribute mapping diff --git a/wpf/Gantt/datetime-indicator-customization.md b/wpf/Gantt/datetime-indicator-customization.md index a5f446f43b..1b9c5513c1 100644 --- a/wpf/Gantt/datetime-indicator-customization.md +++ b/wpf/Gantt/datetime-indicator-customization.md @@ -18,7 +18,7 @@ Essential Gantt provides support for indicating the current date or time in the These are all included in the CurrentDateLinePositions enum. -Essential Gantt allows you to customize the appearance of the DateTime indicator by using the CurrentDateLine property. +Essential Gantt allows you to customize the appearance of the DateTime indicator by using the [CurrentDateLine](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_CurrentDateLine) property. * Today: DateTime indicator will be positioned at the current date. * LoadedTime: DateTime indicator will be positioned at the Gantt control loaded time. @@ -42,13 +42,13 @@ Type Data Type -CurrentDateLine +[CurrentDateLine](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_CurrentDateLine) Get the user-defined line for the DateTime indicator. Dependency Property Line -StickCurrentDateLineTo +[StickCurrentDateLineTo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_StickCurrentDateLineTo) Get/sets the StickCurrentDateLineTo property of the Gantt control.By default this is set to Today. Dependency Property EnumNoneTodayDynamic TimeLoaded TimeAbsolute @@ -58,8 +58,8 @@ EnumNoneTodayDynamic TimeLoaded TimeAbsolute Adding the DateTime indicator customization will change the appearance and position of the DateTime indicator. By default, the DateTime indicator will appear in the current date. The following steps explain how to add a customized DateTime indicator: -1. Set the StickCurrentDateLineTo value for positioning the DateTime indicator. By default this is set as Today. -2. Customize the appearance of the DateTime indicator using the CurrentDateLine API in the Gantt control. +1. Set the [StickCurrentDateLineTo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_StickCurrentDateLineTo) value for positioning the DateTime indicator. By default this is set as Today. +2. Customize the appearance of the DateTime indicator using the [CurrentDateLine](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_CurrentDateLine) API in the Gantt control. The following code samples illustrate how to customize the DateTime indicator. {% tabs %} @@ -116,9 +116,9 @@ strokeArray.Add(5); strokeArray.Add(1); strokeArray.Add(5); -this.Gantt.CurrentDateLine.Stroke = Brushes.Green; -this.Gantt.CurrentDateLine.StrokeDashArray = strokeArray; -this.Gantt.CurrentDateLine.StrokeThickness = 1; +this.ganttControl.CurrentDateLine.Stroke = Brushes.Green; +this.ganttControl.CurrentDateLine.StrokeDashArray = strokeArray; +this.ganttControl.CurrentDateLine.StrokeThickness = 1; {% endhighlight %} diff --git a/wpf/Gantt/dependency-relationship.md b/wpf/Gantt/dependency-relationship.md index 06af8328db..f6270a4ae6 100644 --- a/wpf/Gantt/dependency-relationship.md +++ b/wpf/Gantt/dependency-relationship.md @@ -44,14 +44,14 @@ Data Type Reference links -Predecessor +[Predecessor](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.Predecessor.html) This enables you to set the relationship between the tasks. Object Object NA -GanttTaskRelationship +[GanttTaskRelationship](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.Predecessor.html#Syncfusion_Windows_Controls_Gantt_Predecessor_GanttTaskRelationship) This contains four relationships. They are: * StartToStart @@ -339,7 +339,6 @@ public class ViewModel ///
private ObservableCollection GetDataSource() { - var taskDetails = new ObservableCollection(); taskDetails.Add(new Task() { ID = 1, Name = "Analysis/Planning", StartDate = new DateTime(2011, 7, 3), EndDate = new DateTime(2011, 8, 14), Progress = 40d }); taskDetails[0].ChildCollection.Add((new Task() { ID = 2, Name = "IDentify Components to be Localized", StartDate = new DateTime(2011, 7, 3), EndDate = new DateTime(2011, 7, 5), Progress = 20d })); @@ -355,7 +354,6 @@ public class ViewModel taskDetails[1].ChildCollection.Add((new Task() { ID = 11, Name = "User Assistance Components", StartDate = new DateTime(2011, 7, 10), EndDate = new DateTime(2011, 7, 14), Progress = 10d })); taskDetails[1].ChildCollection.Add((new Task() { ID = 12, Name = "Software components Progress", StartDate = new DateTime(2011, 7, 14), EndDate = new DateTime(2011, 7, 18), Progress = 10d })); - taskDetails.Add(new Task() { ID = 13, Name = "Quality Assurance", StartDate = new DateTime(2011, 7, 3), EndDate = new DateTime(2011, 7, 12), Progress = 40d, }); taskDetails[2].ChildCollection.Add((new Task() { ID = 14, Name = "Review project information", StartDate = new DateTime(2011, 7, 3), EndDate = new DateTime(2011, 7, 15), Progress = 20d })); taskDetails[2].ChildCollection.Add((new Task() { ID = 15, Name = "Localization Component", StartDate = new DateTime(2011, 7, 6), EndDate = new DateTime(2011, 7, 8), Progress = 20d })); @@ -430,7 +428,7 @@ Essential Gantt provides support for dynamic editing of predecessors in the Grid You can add/remove/update the predecessors and resources of tasks at run time. Initially, the Gantt is loaded with the Predecessor/Resource information in the underlying collection and you can update this information if required. -You can edit the predecessor information from the GanttGrid. For resource, you can edit in the underlying source, Gantt will listen to the change in the underlying source and reflect it in both GanttGrid and GanttChart. +You can edit the predecessor information from the [GanttGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttGrid.html). For resource, you can edit in the underlying source, Gantt will listen to the change in the underlying source and reflect it in both [GanttGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttGrid.html) and [GanttChart](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttChart.html). ## Predecessor Validation @@ -451,7 +449,7 @@ Data Type Reference links -ValidationMode +[ValidationMode](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ValidationMode) This contains two modes.
  • Manual,
  • Auto.
@@ -479,7 +477,7 @@ While creating a new predecessor in Grid, it should be in the following format: {% endhighlight %} -Here the {GanttTaskRelationship} is any one of the following: +Here the {[GanttTaskRelationship](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttTaskRelationship.html)} is any one of the following: * SS * FS @@ -497,7 +495,7 @@ If any other data is added, the current editing relationship will be deleted and #### Editing Resources -As of now, resources cannot be edited in Grid. You can update the resource collection in the underlying source whenever you need. Gantt will listen to the changes in the collection and will update the GanttGrid and GanttChart accordingly. +As of now, resources cannot be edited in Grid. You can update the resource collection in the underlying source whenever you need. Gantt will listen to the changes in the collection and will update the [GanttGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttGrid.html) and [GanttChart](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttChart.html) accordingly. #### Use Case Scenario diff --git a/wpf/Gantt/drag-drop.md b/wpf/Gantt/drag-drop.md index 9b92dcc57f..936c5d8dab 100644 --- a/wpf/Gantt/drag-drop.md +++ b/wpf/Gantt/drag-drop.md @@ -8,7 +8,7 @@ documentation: ug --- # Drag and drop support in GanttControl -The WPF `GanttControl` allows you to reorder rows and columns within the `GanttGrid` and rearrange nodes in the `GanttChart` by dragging and dropping them. You can disable drag and drop by setting the `AllowDragDrop` property to false. The default value is `true`. +The WPF [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) allows you to reorder rows and columns within the [GanttGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttGrid.html) and rearrange nodes in the [GanttChart](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttChart.html) by dragging and dropping them. You can disable drag and drop by setting the [AllowDragDrop](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_AllowDragDrop) property to false. The default value is `true`. ![drag-and-drop-in-wpf-gantt-control](Drag-drop-images/drag-and-drop-in-wpf-gantt-control.gif) @@ -26,7 +26,7 @@ this.ganttControl.AllowDragDrop = false; {% endtabs %} ## Handle node drag starting in gantt grid -You can get the node details and handle whether the node can be draggable or not by using the `TreeGridNodeDragStarting` event. This event will be triggered when the node is started dragging. The `TreeGridNodeDragStartingEventArgs` argument contains the `Nodes` property which gets the nodes that contain the associated data while dragging the rows. +You can get the node details and handle whether the node can be draggable or not by using the [TreeGridNodeDragStarting](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_TreeGridNodeDragStarting) event. This event will be triggered when the node is started dragging. The [TreeGridNodeDragStartingEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TreeGridNodeDragStartingEventArgs.html) argument contains the [Nodes](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TreeGridNodeDragStartingEventArgs.html#Syncfusion_Windows_Controls_Gantt_TreeGridNodeDragStartingEventArgs_Nodes) property which gets the nodes that contain the associated data while dragging the rows. {% tabs %} {% highlight xaml %} @@ -52,7 +52,7 @@ private void OnGanttControlTreeGridNodeDragStarting(object sender, TreeGridNodeD {% endtabs %} ## Handle node dragging in gantt grid -You can get the dragging node details in gantt grid by using the `TreeGridNodeDragging` event. This event will be continuously triggered when the node is being dragged. The `TreeGridNodeDraggingEventArgs` argument contains the `Nodes` property which gets the nodes that are being dragged. +You can get the dragging node details in gantt grid by using the [TreeGridNodeDragging](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_TreeGridNodeDragging) event. This event will be continuously triggered when the node is being dragged. The [TreeGridNodeDraggingEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TreeGridNodeDraggingEventArgs.html) argument contains the [Nodes](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TreeGridNodeDraggingEventArgs.html#Syncfusion_Windows_Controls_Gantt_TreeGridNodeDraggingEventArgs_Nodes) property which gets the nodes that are being dragged. {% tabs %} {% highlight xaml %} @@ -77,10 +77,10 @@ private void OnGanttControlTreeGridNodeDragging(object sender, TreeGridNodeDragg {% endtabs %} ## Handle node drop in gantt grid -Using the `TreeGridNodeDrop` event you can get the dropping node details, target node, and you can handle whether the node can be dropped to the specific position or not. This event will trigger after dropping the node. The `TreeGridNodeDropEventArgs` argument contains the following properties. +Using the [TreeGridNodeDrop](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_TreeGridNodeDrop) event you can get the dropping node details, target node, and you can handle whether the node can be dropped to the specific position or not. This event will trigger after dropping the node. The [TreeGridNodeDropEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TreeGridNodeDropEventArgs.html) argument contains the following properties. -* `Nodes` - Gets the item that contains the associated data. -* `TargetNode` - Gets a value indicating the target node which is going to drop. +* [Nodes](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TreeGridNodeDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_TreeGridNodeDropEventArgs_Nodes) - Gets the item that contains the associated data. +* [TargetNode](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TreeGridNodeDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_TreeGridNodeDropEventArgs_TargetNode) - Gets a value indicating the target node which is going to drop. {% tabs %} {% highlight xaml %} @@ -107,15 +107,15 @@ private void OnGanttControlTreeGridNodeDrop(object sender, TreeGridNodeDropEvent {% endtabs %} ## Handle drag and drop in gantt chart -You can get the dragging and dropping node details in gantt chart by using the `NodeDragDelta` and `NodeDragCompleted` events. The `NodeDragAndDropEventArgs` argument contains the following properties. - -* `Node` - Gets or sets the node. -* `HorizontalChange` - Gets or sets the horizontal change. -* `StartTime` - Gets or sets the start time. -* `EndTime` - Gets or sets the end time. -* `Start` - Gets or sets the start. -* `End` - Gets or sets the end. -* `NodePresenter` - Gets the node parent. +You can get the dragging and dropping node details in gantt chart by using the [NodeDragDelta](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_NodeDragDelta) and [NodeDragCompleted](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_NodeDragCompleted) events. The [NodeDragAndDropEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html) argument contains the following properties. + +* [Node](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_NodeDragAndDropEventArgs_Node) - Gets or sets the node. +* [HorizontalChange](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_NodeDragAndDropEventArgs_HorizontalChange) - Gets or sets the horizontal change. +* [StartTime](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_NodeDragAndDropEventArgs_StartTime) - Gets or sets the start time. +* [EndTime](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_NodeDragAndDropEventArgs_EndTime) - Gets or sets the end time. +* [Start](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_NodeDragAndDropEventArgs_Start) - Gets or sets the start. +* [End](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_NodeDragAndDropEventArgs_End) - Gets or sets the end. +* [NodePresenter](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.NodeDragAndDropEventArgs.html#Syncfusion_Windows_Controls_Gantt_NodeDragAndDropEventArgs_NodePresenter) - Gets the node parent. ### Handle node dragging in Gantt chart {% tabs %} diff --git a/wpf/Gantt/filtering-sorting.md b/wpf/Gantt/filtering-sorting.md index 7da00505ea..b6a5ce905a 100644 --- a/wpf/Gantt/filtering-sorting.md +++ b/wpf/Gantt/filtering-sorting.md @@ -8,11 +8,11 @@ documentation: ug --- # Filtering and sorting support in GanttControl -`Filtering` is the process of retrieving values from a collection that satisfy specified conditions. In the `GanttControl`, filtering can be applied through the user interface, allowing users to narrow down the displayed data based on their criteria. -Additionally, the `GanttControl` enables sorting of data against one or more columns in either ascending or descending order. When sorting is applied, the rows are rearranged based on the specified sort criteria, providing users with organized and easily navigable data views. +`Filtering` is the process of retrieving values from a collection that satisfy specified conditions. In the [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html), filtering can be applied through the user interface, allowing users to narrow down the displayed data based on their criteria. +Additionally, the [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) enables sorting of data against one or more columns in either ascending or descending order. When sorting is applied, the rows are rearranged based on the specified sort criteria, providing users with organized and easily navigable data views. ## Filtering -The `GanttControl` provides an Excel-inspired filtering UI with various options to easily filter data. Filtering can be enabled by setting the `AllowFiltering` property of `GanttControl` to `true`. This allows users to open the filter UI by clicking the filter icon on the column header to filter the nodes. The default value of the `AllowFiltering` property is `false`. +The [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) provides an Excel-inspired filtering UI with various options to easily filter data. Filtering can be enabled by setting the [AllowFiltering](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_AllowFiltering) property of [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) to `true`. This allows users to open the filter UI by clicking the filter icon on the column header to filter the nodes. The default value of the [AllowFiltering](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_AllowFiltering) property is `false`. ![filtering-in-wpf-gantt-control](Filtering-sorting-images/filtering-in-wpf-gantt-control.gif) @@ -30,7 +30,7 @@ this.ganttControl.AllowFiltering = true; N> By default, the WPF GanttControl uses the `Extended` filter level. This setting ensures that all parent nodes of any node that meets the filter criteria are shown. ## Sorting -The `GanttControl` allows you to sort column data in either ascending or descending order. When sorting is applied, the rows are rearranged based on the specified sort criteria. You can sort the data by touching or clicking the column header. Sorting can be enabled by setting the `AllowSorting` property to `true`. +The [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) allows you to sort column data in either ascending or descending order. When sorting is applied, the rows are rearranged based on the specified sort criteria. You can sort the data by touching or clicking the column header. Sorting can be enabled by setting the [AllowSorting](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_AllowSorting) property to `true`. ![sorting-in-wpf-gantt-control](Filtering-sorting-images/sorting-in-wpf-gantt-control.gif) diff --git a/wpf/Gantt/getting-started.md b/wpf/Gantt/getting-started.md index 676781c89d..b76747c934 100644 --- a/wpf/Gantt/getting-started.md +++ b/wpf/Gantt/getting-started.md @@ -60,12 +60,24 @@ The following features are available in the Essential Gantt for WPF: * Data Binding * TaskDetails Binding * External Property Binding -* Dependency relationship +* Dependency Relationship +* Auto Update Hierarchy +* Baseline Support * CustomToolTip -* Calendar customization -* Custom Node style -* VisualStyle +* Custom Schedule +* Calendar Customization +* Holidays Customization +* Zooming +* Drag and Drop +* Filtering and Sorting +* Highlighting Tasks +* Custom Node Style +* DateTime Indicator Customization +* Resource View Gantt Inline Items +* Strip Lines * XML Import/Export +* Flow Direction +* Localization ## Adding GanttControl to an application @@ -128,13 +140,16 @@ this.Content = ganttControl; public class ViewModel { + /// + /// Holds the collection value. + /// + private ObservableCollection taskDetails; + public ViewModel() { - taskDetails = this.GetTaskDetails(); + this.taskDetails = this.GetTaskDetails(); } - private ObservableCollection taskDetails; - /// /// Gets or sets the task collection. /// @@ -143,11 +158,11 @@ public class ViewModel { get { - return taskDetails; + return this.taskDetails; } set { - taskDetails = value; + this.taskDetails = value; } } @@ -166,7 +181,6 @@ public class ViewModel taskDetails[0].Child.Add(new TaskDetails { TaskId = 5, TaskName = "Secure complete", StartDate = new DateTime(2011, 7, 14), FinishDate = new DateTime(2011, 7, 14), Progress = 20d }); taskDetails.Add(new TaskDetails { TaskId = 6, TaskName = "Risk Assessment", StartDate = new DateTime(2011, 7, 8), FinishDate = new DateTime(2011, 7, 24), Progress = 30d }); - taskDetails[1].Child.Add(new TaskDetails { TaskId = 7, TaskName = "Perform risk assessment", StartDate = new DateTime(2011, 7, 8), FinishDate = new DateTime(2011, 7, 21), Progress = 20d }); taskDetails[1].Child.Add(new TaskDetails { TaskId = 8, TaskName = "Evaluate risk assessment", StartDate = new DateTime(2011, 7, 8), FinishDate = new DateTime(2011, 7, 23), Progress = 30d }); taskDetails[1].Child.Add(new TaskDetails { TaskId = 9, TaskName = "Prepare contingency plans", StartDate = new DateTime(2011, 7, 12), FinishDate = new DateTime(2011, 7, 24), Progress = 30d }); diff --git a/wpf/Gantt/highlighting-tasks.md b/wpf/Gantt/highlighting-tasks.md index 6f702febf1..6029b2ea01 100644 --- a/wpf/Gantt/highlighting-tasks.md +++ b/wpf/Gantt/highlighting-tasks.md @@ -27,13 +27,13 @@ Type Data Type -HighlightedItems +[HighlightedItems](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_HighlightedItems) The items that are passed through this API will be highlighted in Gantt chart region. The items should be in linear form. Dependency IList -HighlightItemBrush +[HighlightItemBrush](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_HighlightItemBrush) Specifies the color in which items should be highlight Dependency Brush @@ -45,8 +45,8 @@ Brush To highlight a set of tasks in Gantt chart region: 1. Define the Gantt with initial setup. -1. Bind the tasks that need to be highlighted with Gantt’s HighlightedItems API. -2. If required, change the value of the Gantt’s HighlightItemBrush API to change the item highlight color. The default color is red. +1. Bind the tasks that need to be highlighted with Gantt’s [HighlightedItems](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_HighlightedItems) API. +2. If required, change the value of the Gantt’s [HighlightItemBrush](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_HighlightItemBrush) API to change the item highlight color. The default color is red. {% capture codesnippet1 %} {% tabs %} @@ -274,7 +274,7 @@ this.ganttControl.TaskAttributeMapping = taskAttributeMapping; { get { - return endDate; + return this.endDate; } set { @@ -286,7 +286,7 @@ this.ganttControl.TaskAttributeMapping = taskAttributeMapping; this.endDate = value; } else - endDate = value; + this.endDate = value; this.RaisePropertyChanged("EndDate"); /// Duration changed is invoked to notify the chagne in duration based on the new end date. this.RaisePropertyChanged("Duration"); diff --git a/wpf/Gantt/holidays-customization.md b/wpf/Gantt/holidays-customization.md index be6cb6b1ec..1f52b7bdce 100644 --- a/wpf/Gantt/holidays-customization.md +++ b/wpf/Gantt/holidays-customization.md @@ -11,21 +11,21 @@ documentation: ug The GanttControl allows customers to differentiate the dates of holidays. This support is used to highlight the holidays in the Gantt chart. -The holidays can be specified using the `Holidays` property in the SfGantt, which holds a collection of `GanttHoliday`. +The holidays can be specified using the [Holidays](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_Holidays) property in the SfGantt, which holds a collection of [GanttHoliday](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttHoliday.html). The following properties in the GanttHoliday are used to define the holidays: -* `Day`: Specifies the holiday date. +* [Day](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttHoliday.html#Syncfusion_Windows_Controls_Gantt_GanttHoliday_Day): Specifies the holiday date. -* `Background`: Specifies the brush to highlight the holiday. +* [Background](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttHoliday.html#Syncfusion_Windows_Controls_Gantt_GanttHoliday_Background): Specifies the brush to highlight the holiday. N> If the background is not defined, then the Non-WorkingDays background will be applied. The following properties in the GanttControl are used to customize the holiday feature: -* `ShowHolidays`: Indicates whether to enable or disable the holidays in the Gantt chart. +* [ShowHolidays](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ShowHolidays): Indicates whether to enable or disable the holidays in the Gantt chart. -* `ExcludeHolidays`: Indicates whether to include or exclude the holidays in duration calculation. +* [ExcludeHolidays](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ExcludeHolidays): Indicates whether to include or exclude the holidays in duration calculation. The following code sample demonstrates how to define the holidays. @@ -167,7 +167,6 @@ public partial class MainWindow : Window 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 })); diff --git a/wpf/Gantt/import-and-export-support.md b/wpf/Gantt/import-and-export-support.md index 2a56a55a42..5729691d15 100644 --- a/wpf/Gantt/import-and-export-support.md +++ b/wpf/Gantt/import-and-export-support.md @@ -22,13 +22,13 @@ Type Data Type -ImportFromXMLCommand +[ImportFromXMLCommand](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ImportFromXMLCommand) Command binding used to import the XML file generated from MS Project to populate data’s in Gantt control. Command DelegateCommand -ExportToXMLCommand +[ExportToXMLCommand](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ExportToXMLCommand) Command binding used to export the XML file generated from Gantt control to populate data’s in MS Project. Command DelegateCommand @@ -47,14 +47,14 @@ Type Return Type -ExportToXML() +[ExportToXML()](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ExportToXML) Responsible for exporting the GanttControl to MSProject XML File. - - bool -ImportFromXML() +[ImportFromXML()](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ImportFromXML) Responsible for importing the data from MS Project XML file to GanttControl. - - @@ -118,9 +118,26 @@ The following code illustrates how to Import and Export Task Details from or to {% highlight c# %} +//Initializing Gantt +this.ganttControl.ItemsSource = new ViewModel().TaskCollection; + +// 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; + private void OnSaveButtonClick(object sender, System.Windows.RoutedEventArgs e) { - if (this.Gantt.ExportToXML()) + if (this.ganttControl.ExportToXML()) { MessageBox.Show("Tasks exported successfully.", "XML Import/Export", @@ -131,7 +148,7 @@ private void OnSaveButtonClick(object sender, System.Windows.RoutedEventArgs e) private void OnOpenButtonClick(object sender, System.Windows.RoutedEventArgs e) { - if (this.Gantt.ImportFromXML()) + if (this.ganttControl.ImportFromXML()) { MessageBox.Show("Tasks imported successfully.", "XML Import/Export", @@ -140,23 +157,6 @@ private void OnOpenButtonClick(object sender, System.Windows.RoutedEventArgs e) } } -//Initializing Gantt -this.ganttControl.ItemsSource = new ViewModel().TaskCollection; - -// 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 %} {% highlight c# tabtitle="ViewModel.cs" %} diff --git a/wpf/Gantt/localization.md b/wpf/Gantt/localization.md index ecfae92139..741a5fe30c 100644 --- a/wpf/Gantt/localization.md +++ b/wpf/Gantt/localization.md @@ -10,7 +10,7 @@ documentation: ug # Localization in WPF Gantt -Localization is the process of translating the application resources into different language for the specific cultures. You can localize the GanttControl by [adding resource file](https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/aa992030(v=vs.100)). Application culture can be changed by setting `CurrentUICulture` and `CurrentCulture` before `InitializeComponent()` method. +Localization is the process of translating the application resources into different language for the specific cultures. You can localize the [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) by [adding resource file](https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/aa992030(v=vs.100)). Application culture can be changed by setting `CurrentUICulture` and `CurrentCulture` before `InitializeComponent()` method. In the below application, culture is configured to French language. @@ -28,7 +28,7 @@ public MainWindow() {% endtabs %} -To localize the GanttControl based on `CurrentUICulture` using resource files, follow the below steps. +To localize the [GanttControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html) based on `CurrentUICulture` using resource files, follow the below steps. 1.Create new folder and named as **Resources** in your application. 2.Add the default resource file of GanttControl into **Resources** folder. You can download the Syncfusion.Gantt.WPF.resx [here](http://www.syncfusion.com/downloads/support/directtrac/general/ze/Resources-2137559261.zip). diff --git a/wpf/Gantt/migration-to-26v-or-higher.md b/wpf/Gantt/migration-to-26v-or-higher.md index 7526d00bba..47ef12c3cd 100644 --- a/wpf/Gantt/migration-to-26v-or-higher.md +++ b/wpf/Gantt/migration-to-26v-or-higher.md @@ -49,7 +49,7 @@ Syncfusion.Windows.Controls.Gantt.Chart -{{'[GanttGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.Grid.GanttGrid.html)'| markdownify }} +{{'[GanttGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttGrid.html)'| markdownify }} {{'[GridTreeControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Grid.GridTreeControl.html)'| markdownify }} {{'[SfTreeGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.html)'| markdownify }} diff --git a/wpf/Gantt/resource-view-gantt-inline-items.md b/wpf/Gantt/resource-view-gantt-inline-items.md index f0af942df2..4cc2a091c1 100644 --- a/wpf/Gantt/resource-view-gantt-inline-items.md +++ b/wpf/Gantt/resource-view-gantt-inline-items.md @@ -11,7 +11,7 @@ documentation: ug By default, the Gantt chart will display a single node in a row. This helps you to manage the project. When you want to manage the resources in a project, you need multiple nodes in a single row. A Resource view Gantt enables you to manage the resources involved in a project. -In a normal Gantt, a node represents a task or activity of the project. In a resource view Gantt, the node represents task assigned to a resource. Multiple tasks assigned to a resource can be displayed in a single row. You can achieve this by using the mapping attribute of the InLineTaskMapping. +In a normal Gantt, a node represents a task or activity of the project. In a resource view Gantt, the node represents task assigned to a resource. Multiple tasks assigned to a resource can be displayed in a single row. You can achieve this by using the mapping attribute of the [InLineTaskMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html#Syncfusion_Windows_Controls_Gantt_TaskAttributeMapping_InLineTaskMapping). Essential Gantt will listen to the dynamic inclusion of inline items and refresh the chart region. @@ -42,7 +42,7 @@ Example: A very big development project that contains multiple phases to complet ## Adding Inline Items to an Application -You can populate a resource view Gantt by populating the collection of tasks in a single row by mapping the corresponding field in the underlying source to the InLineTaskMapping. +You can populate a resource view Gantt by populating the collection of tasks in a single row by mapping the corresponding field in the underlying source to the [InLineTaskMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html#Syncfusion_Windows_Controls_Gantt_TaskAttributeMapping_InLineTaskMapping). You can populate a Resource view Gantt for both date-time schedules and numeric schedules. @@ -51,7 +51,7 @@ You can populate a Resource view Gantt for both date-time schedules and numeric To populate a Resource view Gantt in a Custom Numeric Schedule: 1. Define the Gantt with a custom numeric schedule source. For more information about custom numeric schedules, visit the following link: -2. You can populate the collection of tasks in a single row by mapping the corresponding field in the underlying source to the InLineTaskMapping. +2. You can populate the collection of tasks in a single row by mapping the corresponding field in the underlying source to the [InLineTaskMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html#Syncfusion_Windows_Controls_Gantt_TaskAttributeMapping_InLineTaskMapping). {% tabs %} {% highlight xaml %} @@ -641,7 +641,7 @@ The following shows the Resultant output: To populate the Resource view Gantt with a date-time schedule: 1. Define the Gantt with DateTime values. -2. Populate the collection of tasks in a single row by mapping the corresponding field in the underlying source to the InLineTaskMapping. +2. Populate the collection of tasks in a single row by mapping the corresponding field in the underlying source to the [InLineTaskMapping](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.TaskAttributeMapping.html#Syncfusion_Windows_Controls_Gantt_TaskAttributeMapping_InLineTaskMapping). {% tabs %} {% highlight xaml %} diff --git a/wpf/Gantt/strip-lines.md b/wpf/Gantt/strip-lines.md index 4a135499f5..0b7c8e1151 100644 --- a/wpf/Gantt/strip-lines.md +++ b/wpf/Gantt/strip-lines.md @@ -54,103 +54,103 @@ Type Data Type -Background +[Background](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_Background) Gets/sets background color of strip line. CLR Brush -Content +[Content](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_Content) Gets/sets the content of the strip line. CLR Object -ContentTemplate +[ContentTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_ContentTemplate) Gets/sets the content template of the strip line. CLR DataTemplate -ContentTemplateSelector +[ContentTemplateSelector](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_ContentTemplateSelector) Gets/sets the TemplateSelector of the strip line. CLR DataTemplateSelector -StartDate +[StartDate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_StartDate) Gets/sets the start date of the strip line. CLR DateTime -EndDate +[EndDate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_EndDate) Gets/sets the end date of the strip line. CLR DateTime -RepeatBehavior +[RepeatBehavior](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_RepeatBehavior) Gets/sets the repeat behavior of the strip line. CLR Repeat (Enum) -RepeatFor +[RepeatFor](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_RepeatFor) Gets/sets the intervals between the repeating strip lines. CLR Integer -RepeatUpto +[RepeatUpto](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_RepeatUpto) Gets/sets DateTime value. The strip line will be repeated up to this value. CLR DateTime -Style +[Style](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_Style) Gets/sets the style for the strip line. CLR Style -StyleSelector +[StyleSelector](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_StyleSelector) Gets/sets the style selector of the strip line. CLR StyleSelector -VerticalContentAlignment +[VerticalContentAlignment](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_VerticalContentAlignment) Gets/sets the vertical alignment of the content present in the strip line. CLR VerticalAlignment -HorizontalContentAlignment +[HorizontalContentAlignment](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_HorizontalContentAlignment) Gets/sets the horizontal alignment of the content present in the strip line. CLR Horizontal Alignment -Type +[Type](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_Type) Gets/sets the type of the strip line. CLR StriplineType(Enum) -Position +[Position](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_Position) Gets/sets the absolute position of the strip line for Absolute strip line type. CLR Point -Height +[Height](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_Height) Gets/sets the absolute height of the strip line for Absolute strip line type. CLR Double -Width +[Width](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StripLineInfo.html#Syncfusion_Windows_Controls_Gantt_StripLineInfo_Width) Get/sets the absolute width of the strip line for Absolute strip line type. CLR Double @@ -173,13 +173,13 @@ Type Data Type -ShowStripLines +[ShowStripLines](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ShowStripLines) Get the user option to show the strip lines. Dependency Property Bool -StripLines +[StripLines](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_StripLines) Get/sets the collection of StripLineInfo from the user. Dependency Property IEnumerable @@ -197,11 +197,11 @@ Property Description -Repeat +[Repeat](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.Repeat.html) This property contains the following values:Year: Repeating the strip line on a yearly basis depends on the RepeatFor value in StripLineInfo.Month: Repeating the strip line on a monthly basis depends on the RepeatFor value in StripLineInfo.Week: Repeating the strip line on a weekly basis depends on the RepeatFor value in StripLineInfo.Day: Repeating the strip line on a daily basis depends on the RepeatFor value in StripLineInfo.Hour: Repeating the strip line on an hourly basis depends on the RepeatFor value in StripLineInfo.Minute: Repeating the strip line on per-minute basis depends on the RepeatFor value in StripLineInfo. -StriplineType +[StriplineType](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.StriplineType.html#fields) This property contains the following values:Regular: This denotes the normal strip line.Absolute: This denotes the absolute strip line. You can customize the position, size, and appearance of the strip line in this type. @@ -219,7 +219,7 @@ Arguments Type -StripLineCreated +[StripLineCreated](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_StripLineCreated) Whenever a strip line is created, this event will be triggered. the handler of the event will have the newly created strip line (StripLineInfo) in the argument.By handling this event, you can customize the appearance of the strip line. StripLineCreated(object sender, StriplineCreatedEventArgs args) Event diff --git a/wpf/Gantt/zooming.md b/wpf/Gantt/zooming.md index d08f2ed900..335c678f61 100644 --- a/wpf/Gantt/zooming.md +++ b/wpf/Gantt/zooming.md @@ -26,8 +26,8 @@ Built-in zooming allows you to zoom in and zoom out of the schedule rows. The bu To add the built-in zooming: 1. Define the Gantt with initial values. -2. Set the UseOnDemandSchedule API value as _true_. If need set BaseCellMinLength and BaseCellMaxLength, the default value of these APIs are 20 and 40 respectively. -3. Use a slider or any control to provide the zoom factor dynamically. Bind the Gantt’s zoom factor to that control value. +2. Set the [UseOnDemandSchedule](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_UseOnDemandSchedule) API value as _true_. If need to set [BaseCellMinLength](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaseCellMinLength) and [BaseCellMaxLength](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaseCellMaxLength), the default value of these APIs are 20 and 40 respectively. +3. Use a slider or any control to provide the zoom factor dynamically. Bind the Gantt’s [ZoomFactor](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ZoomFactor) to that control value. {% capture codesnippet1 %} {% tabs %} @@ -113,7 +113,7 @@ slider.ValueChanged += OnSliderValueChanged; void OnSliderValueChanged(object sender, RoutedPropertyChangedEventArgs e) { //Changing the value of zoom factor - this.Gantt.ZoomFactor = (sender as Slider).Value; + this.ganttControl.ZoomFactor = (sender as Slider).Value; } {% endhighlight %} @@ -256,10 +256,10 @@ When you like to view tasks that are scheduled on a month unit in the day/hours To add custom zooming: 1. Define the Gantt with initial values. -2. Set the UseOnDemandSchedule API value as true. -3. If needed, set BaseCellMinLength and BaseCellMaxLength. The default value of these APIs are 20 and 40 respectively. -4. Use any control to provide the zoom factor dynamically. Bind the Gantt’s zoom factor to that control value. -5. Handle the ZoomChanged event handler in code behind and change the schedule row information in that event handler as illustrated in the following code example: +2. Set the [UseOnDemandSchedule](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_UseOnDemandSchedule) API value as true. +3. If needed, set [BaseCellMinLength](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaseCellMinLength) and [BaseCellMaxLength](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaseCellMaxLength). The default value of these APIs are 20 and 40 respectively. +4. Use any control to provide the zoom factor dynamically. Bind the Gantt’s [ZoomFactor](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ZoomFactor) to that control value. +5. Handle the [ZoomChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ZoomChanged) event handler in code behind and change the schedule row information in that event handler as illustrated in the following code example: {% capture codesnippet2 %} {% tabs %} @@ -574,25 +574,25 @@ Type Data Type -UseOnDemandSchedule +[UseOnDemandSchedule](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_UseOnDemandSchedule) To get the expected performance you need to use dynamic schedule rendering. Dependency boolean -BaseCellMaxLength +[BaseCellMaxLength](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaseCellMaxLength) Splits the schedule cells by comparing the cell size with the API value on zooming-in Dependency double -BaseCellMinLength +[BaseCellMinLength](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_BaseCellMinLength) Merges schedule cells by comparing the cell size with the API value on zooming-out Dependency double -ZoomFactor +[ZoomFactor](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ZoomFactor) Zooming takes place based on the ZoomFactor. The ZoomFactor should be greater than zero. Dependency double @@ -610,7 +610,7 @@ Arguments Type -ZoomChanged +[ZoomChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Gantt.GanttControl.html#Syncfusion_Windows_Controls_Gantt_GanttControl_ZoomChanged) Event triggers when the zoom factor is changed. This can be handled in application level. ZoomChangedEventArgs Simple event diff --git a/wpf/HeatMap/Overview.md b/wpf/HeatMap/Overview.md index 7d3a75c626..c86820222e 100644 --- a/wpf/HeatMap/Overview.md +++ b/wpf/HeatMap/Overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About WPF HeatMap (SfHeatMap) Control | Syncfusion -description: Learn here all about introduction of Syncfusion Essential Studio WPF HeatMap (SfHeatMap) control, its elements and more. +title: Overview of WPF HeatMap (SfHeatMap) Control | Syncfusion +description: Learn here all about overview of Syncfusion Essential Studio WPF HeatMap (SfHeatMap) control, its elements, and more. platform: wpf control: SfHeatMap documentation: ug --- -# WPF HeatMap (SfHeatMap) Overview +# Overview of WPF HeatMap (SfHeatMap) **Essential HeatMap WPF** represents tabular data values as gradient colors instead of numbers. Low and high values are different colors with different gradients.