MindFusion.Scheduling for Silverlight Programmer's Guide
IProjectViewModel.CreateActivity Method
See Also
 





Creates and adds a new activity to the project. A respective object of type ActivityType is created and added to the underlying model as well.

Namespace: MindFusion.DataViews.Silverlight
Assembly: MindFusion.DataViews.Silverlight

 Syntax

C#  Copy Code

public abstract IActivityViewModel CreateActivity (
    IActivityViewModel parent,
    int index
)

Visual Basic  Copy Code

Public MustOverride Function CreateActivity ( _
    parent As IActivityViewModel, _
    index As Integer _
) As IActivityViewModel

 Parameters

parent
The parent of the newly created activity, or null (Nothing in Visual Basic), if the new activity should be top-level.
index
The index within parent where the new activity will be added, or -1, to add the new activity at the end of the parent's children collection.

 Return Value

An IActivityViewModel representing the newly created activity, or null (Nothing in Visual Basic), if the operation could not be completed.

 See Also

IProjectViewModel Members
IProjectViewModel Interface
MindFusion.DataViews.Silverlight Namespace