Data binding architecture in Gantt Chart Library and Project Management Library for WPF

Referring to Gantt Chart Library for WPF and/or Project Management Library for WPF, here are some clues to understand better both the architecture of the DlhSoft software components and how to use them with (or without) data binding:

First of all, TaskManager class is a business logic provider (a different class, without any UI) for tasks that are shown in the Gantt Chart. When you databind the control to a list of task items, a manager object is created for managing the task items and transforming them to a list of Task objects which are always valid (even if the source task items may have issues, such as Finish < Start or anything like that). And the UI of the control will be in fact bound to the Task collection generated by the TaskManager. And the manager object (or objects generated by the manager, themselves) will automatically change when some other dependent information changes: for example if you have a dependency between two tasks, and the first task changes its finish date, the second task's start date may be changed automatically (this is the role of the dependency - or, in another word, predecessor definition). You could use the TaskManager object even outside of the control, if you woudn't need the UI, just the logic that manages tasks. You can also work with a TaskManager object using the simple data management mode, and adding/removing tasks from the manager object manually, yourself (using Add/Remove methods), and therefore avoiding data binding to an item collection and improving performance. You can then pass the separate manager (set either to use the standard or the simple data management mode) to a UI control (using the TaskManagerSource property) in order for the control to link to the existing TaskManager instead of creating its own instance. (This is actually required when you want multiple different controls to be bound on the same data and business logic provider, in order to create a single business logic provider (a single TaskManager object) for the items.)


As already discussed, the control UI, including the left task list view is bound to the managed task objects (Task instances) generated by the manager object, and not directly to your original TaskItem objects. The *MemberPath properties identify which properties of Task object should be bound (automatically) to which properties of your CustomTaskItem class. Internally, the manager objects does these bindings automatically based on your specifications (by default the *MemberPath properties are set to point to the appropriate properties of the basic TaskItem class). This is of course true only for the required properties, such as Start, Effort, etc., but to present custom properties (e.g. MyValue property), you don't need (and you can't) specify *MemberPath definitions: you need to define a custom GridView object in the list view (using the View property), and within a GridViewColumn define a DataTemplate referring to the custom property using Item.MyValue syntax. The Item. prefix means getting access to the original task item data object.

How can I use task custom appearance or bar templating with custom data binding?