MindFusion.Wpf Pack Programmer's Guide
BaseChart.CreateViewModel Method
See Also
 





Creates a new ViewModel for the specified activity and dependency models. The ViewModel is automatically associated with the chart through its DataContext property.

Namespace: MindFusion.DataViews.Wpf
Assembly: MindFusion.DataViews.Wpf

 Syntax

C#  Copy Code

public IProjectViewModel CreateViewModel (
    IEnumerable activites,
    IEnumerable dependencies,
    IEnumerable resources,
    IEnumerable allocations,
    Type activityType,
    Type dependencyType,
    Type resourceType,
    Type resourceAllocationType
)

Visual Basic  Copy Code

Public Function CreateViewModel( _
    activites As IEnumerable, _
    dependencies As IEnumerable, _
    resources As IEnumerable, _
    allocations As IEnumerable, _
    activityType As Type, _
    dependencyType As Type, _
    resourceType As Type, _
    resourceAllocationType As Type _
) As IProjectViewModel

 Parameters

activites
A .NET IEnumerable describing the activity backing store. This object needs to implement the IList interface if changes to the ViewModel are expected to reflect to the backing store. This object needs to implement INotifyCollectionChanged if changes to the backing store are expected to reflect to the ViewModel.
dependencies
A .NET IEnumerable describing the dependency backing store. This object needs to implement the IList interface if changes to the ViewModel are expected to reflect to the backing store. This object needs to implement INotifyCollectionChanged if changes to the backing store are expected to reflect to the ViewModel.
resources
A .NET IEnumerable describing the resource backing store. This object needs to implement the IList interface if changes to the ViewModel are expected to reflect to the backing store. This object needs to implement INotifyCollectionChanged if changes to the backing store are expected to reflect to the ViewModel.
allocations
A .NET IEnumerable describing the resource allocations backing store. This object needs to implement the IList interface if changes to the ViewModel are expected to reflect to the backing store. This object needs to implement INotifyCollectionChanged if changes to the backing store are expected to reflect to the ViewModel.
activityType
The Type of new activities created through the ViewModel. If this parameter is null (Nothing in Visual Basic) the newly created activities are of type Activity.
dependencyType
The Type of new dependencies created through the ViewModel. If this parameter is null (Nothing in Visual Basic) the newly created dependencies are of type Dependency.
resourceType
The Type of new resources created through the ViewModel. If this parameter is null (Nothing in Visual Basic) the newly created resources are of type Resource.
resourceAllocationType
The Type of new resource allocations created through the ViewModel. If this parameter is null (Nothing in Visual Basic) the newly created allocations are of type ResourceAllocation.

 Return Value

A built-in implementation of the IProjectViewModel interface wrapping the specified sources.

 See Also

BaseChart Members
BaseChart Class
MindFusion.DataViews.Wpf Namespace