Version

Enabling/Disabling User Interactions

Topic Overview

Purpose

This topic describes the xamGantt™ control’s configurable user interactions.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic describes the available user interactions using the xamGantt control’s grid section.

This topic describes the available user interactions using the xamGantt control’s chart section.

This topic describes how to add the xamGantt control to a page.

This topic describes how the xamGantt control is bound to an arbitrary data collection via ListBackedProject.

User Interactions Configuration Summary

User interactions configuration summary chart

The following table lists the xamGantt control’s configurable user interactions. Additional details are available following the summary table.

Configurable aspects Details Properties

All user interactions with the xamGantt project (tasks editing and project editing) can be enabled/disabled.

The user interactions with the xamGantt grid columns (showing/hiding, moving and resizing) can be enabled/disabled.

The user interactions with the project tasks (inserting, deleting and indenting/outdenting) can be enabled/disabled.

The user interactions with the taskbars (dragging and resizing) can be enabled/disabled.

Enable/Disable User Interactions with Project

Overview

By default, all user interactions with xamGantt project (for example, tasks inserting and deleting, and tasks fields editing) are enabled.

User interactions with the project can be disabled in order to use the xamGantt control only for displaying the project plan in read-only mode.

Property settings

The following table maps the user interaction configuration to property settings.

In order to: Use this property: Of type:

Enable/disable user interactions with project

Bool

Enable/Disable User Interactions with Grid Columns

Overview

By default, all user interactions with grid columns are enabled.

The moving, resizing, showing, hiding and editing can be enabled or disabled either for a specific column or for all columns.

Property settings

The following table maps the user interaction configuration to property settings.

In order to: Use this property: Of type:

Enable/disable columns hiding

Nullable<bool>

Enable/disable columns moving

Nullable<bool>

Enable/disable columns resizing

Nullable<bool>

Enable/disable columns showing

Nullable<bool>

Enable/disable columns editing

Nullable<bool>

Enable/Disable User Interactions with Tasks

Overview

By default, all user interactions with project tasks are enabled.

The tasks inserting, deleting, indenting and outdenting can be either enabled or disabled.

Property settings

The following table maps the user interaction configuration to property settings.

In order to: Use this property: Of type:

Enable/disable tasks indenting/outdenting

Nullable<bool>

Enable/disable tasks deleting

Nullable<bool>

Enable/disable tasks inserting

Nullable<bool>

Enable tasks linking

ProjectTaskDependencyLineType and set it to Direct or Indirect

Disable tasks linking

ProjectTaskDependencyLineType and set it to None

Enable/Disable User Interactions with Taskbars

Overview

By default, all user interactions with taskbars are enabled.

The taskbars dragging and resizing can be enabled or disabled.

Property settings

The following table maps the user interaction configuration to property settings.

In order to: Use this property: Of type:

Enable/disable deadline indicator dragging

Nullable<bool>

Enable/disable milestones dragging

Nullable<bool>

Enable/disable progress bar dragging

Nullable<bool>

Enable/disable summaries dragging

Enable/disable tasks dragging

Nullable<bool>

Enable/disable summaries resizing

Enable/disable tasks resizing

Nullable<bool>

Code Examples

Code examples summary

The following table lists the code examples included in this topic.

Example Description

The code snippet demonstrates how tasks inserting and deleting are disabled.

The code snippet demonstrates how columns moving and resizing are disabled.

Code Example: Disable Tasks Inserting and Deleting

Description

The code snippet demonstrates how to disable tasks inserting and deleting.

The specified TaskSettings are applied to all tasks within the ListBackedProject. The ProjectTaskSettings object represents the ProjectTask settings.

Code

In XAML:

<ig:ListBackedProject x:Name="dataProvider"
                      TaskItemsSource="{Binding Tasks}">
    <ig:ListBackedProject.TaskSettings>
        <ig:ProjectTaskSettings AllowDelete="
                                AllowInsert="/>
        </ig:ListBackedProject.TaskSettings>
    <ig:ListBackedProject.TaskPropertyMappings>
        <!-- Specify ProjectTaskPropertyMappings Here -->
    </ig:ListBackedProject.TaskPropertyMappings>
</ig:ListBackedProject>

Code Example: Disable Columns Moving and Resizing

Description

The code snippet demonstrates how to disable column moving and resizing.

Applies the ProjectColumnSettings specified in the xamGantt DefaultColumnSettings to all columns.

Code

In XAML:

<ig:XamGantt x:Name="gantt"
             Project="{Binding ElementName=dataProvider}">
    <ig:XamGantt.DefaultColumnSettings>
        <!-- Disable moving and resizing for all columns -->
        <ig:ProjectColumnSettings
            AllowMove="
            AllowResize="/>
    </ig:XamGantt.DefaultColumnSettings>
</ig:XamGantt>

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

The topics in this group explain the main configurable aspects of the xamGantt control.