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





Creates and adds a new activity to the project.

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

 Syntax

C#  Copy Code

public abstract IActivityViewModel DoCreateActivity (
    IActivityViewModel parent,
    int index
)

Visual Basic  Copy Code

Public MustOverride Function DoCreateActivity ( _
    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.

 Remarks

This method is not subject to undo/redo and should not be invoked directly. Instead, call the CreateActivity method, which will register the operation for subsequent undo.

 See Also

IProjectViewModel Members
IProjectViewModel Interface
MindFusion.DataViews.Silverlight Namespace