xmlns:ig="http://schemas.infragistics.com/xaml"
xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives"
This topic describes many of the more commonly used commands available in the xamGantt™ control and how to use them.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The xamGantt control provides a set of commands for performing some common user operations such as inserting and deleting tasks, scrolling, indenting and outdenting and many more.
The following table lists, xamGantt’s more commonly used commands. For more information, check the full list in the API documentation ( GanttCommandId Enumeration).
The following table summarizes the purpose and functionality of the xamGantt control’s more commonly used commands.
The following code explains how to use xamGantt commands to insert and delete tasks.
Add the following namespaces in your page:
In XAML:
xmlns:ig="http://schemas.infragistics.com/xaml"
xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives"
The code below adds a xamGantt and two buttons to your page to perform inserting and deleting tasks using commands.
In XAML:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="22" />
</Grid.RowDefinitions>
<ig:XamGantt x:Name="gantt" Project="{Binding}" />
<StackPanel Grid.Row="1" Orientation="Horizontal">
<Button x:Name="Btn_InsertTask" Content="Insert Task">
<ig:Commanding.Command>
<igPrim:GanttCommandSource
TargetName="gantt"
CommandType="InsertTask"
EventName="Click"/>
</ig:Commanding.Command>
</Button>
<Button x:Name="Btn_DeleteTask" Content="Delete Task">
<ig:Commanding.Command>
<igPrim:GanttCommandSource
TargetName="gantt"
CommandType="DeleteTask"
EventName="Click"/>
</ig:Commanding.Command>
</Button>
</StackPanel>
</Grid>
The following topics provide additional information related to this topic.