diff --git a/wpf/Gantt/import-and-export-support.md b/wpf/Gantt/import-and-export-support.md index e948313ba8..70b7e3f362 100644 --- a/wpf/Gantt/import-and-export-support.md +++ b/wpf/Gantt/import-and-export-support.md @@ -62,7 +62,9 @@ bool -## Import/Export Task Details from/to XML +## Importing and Exporting tasks from/to XML + +### Using default model (TaskDetails) The following code illustrates how to Import and Export Task Details from or to XML. @@ -97,17 +99,6 @@ The following code illustrates how to Import and Export Task Details from or to - - - @@ -121,20 +112,6 @@ The following code illustrates how to Import and Export Task Details from or to //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.ganttControl.ExportToXML()) @@ -266,6 +243,390 @@ private void OnOpenButtonClick(object sender, System.Windows.RoutedEventArgs e) {% endhighlight %} {% endtabs %} +### Using Custom model + +The following code illustrates how to Import and Export custom model from or to XML. + +{% tabs %} +{% highlight xaml %} + + + + + + + +