In This Article

TaskBoard Class

Represents a task board.

[TemplatePart(Name = "PART_AdornmentCanvas", Type = typeof(Canvas))]
public class TaskBoard : ItemsControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object

Constructors

TaskBoard()

Initializes an instance of the TaskBoard class.

public TaskBoard()

Properties

CanCardsDrag

Gets or sets whether cards can be dragged and reordered.

public bool CanCardsDrag { get; set; }

Property Value

bool:

true if cards can be dragged and reordered; otherwise, false. The default value is true.

CanColumnsDrag

Gets or sets whether columns can be dragged and reordered.

public bool CanColumnsDrag { get; set; }

Property Value

bool:

true if columns can be dragged and reordered; otherwise, false. The default value is true.

CardContainerStyle

Gets or sets the Style to use for card containers.

public Style CardContainerStyle { get; set; }

Property Value

Style:

The Style to use for card containers.

CardContainerStyleSelector

Gets or sets the StyleSelector to use for card containers.

public StyleSelector CardContainerStyleSelector { get; set; }

Property Value

StyleSelector:

The StyleSelector to use for card containers.

CardCornerRadius

Gets or sets the card corner radius.

public CornerRadius CardCornerRadius { get; set; }

Property Value

CornerRadius:

The card corner radius. The default value is 3.0.

CardDragRotationAngle

Gets the angle at which cards should be rotated when dragged.

public double CardDragRotationAngle { get; set; }

Property Value

double:

The angle at which cards should be rotated when dragged. The default value is 3 degrees. Set the property to 0 to prevent rotation.

CardSpacing

Gets or sets the spacing between cards.

public double CardSpacing { get; set; }

Property Value

double:

The spacing between cards. The default value is 7.0.

CardTemplate

Gets or sets the DataTemplate to use for cards.

public DataTemplate CardTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use for cards.

CardTemplateSelector

Gets or sets the DataTemplateSelector to use for cards.

public DataTemplateSelector CardTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for cards.

ColumnCornerRadius

Gets or sets the column corner radius.

public CornerRadius ColumnCornerRadius { get; set; }

Property Value

CornerRadius:

The column corner radius. The default value is 3.0.

ColumnDragRotationAngle

Gets the angle at which columns should be rotated when dragged.

public double ColumnDragRotationAngle { get; set; }

Property Value

double:

The angle at which columns should be rotated when dragged. The default value is 3 degrees. Set the property to 0 to prevent rotation.

ColumnItemsSourcePath

Gets or sets the name of the property on the columns view model that provides the items source for the cards.

public string ColumnItemsSourcePath { get; set; }

Property Value

string:

The name of the property on the columns view model that provides the items source for the cards.

ColumnPadding

Gets or sets the column padding.

public Thickness ColumnPadding { get; set; }

Property Value

Thickness:

The column padding. The default value is 7.0.

ColumnSpacing

Gets or sets the spacing between columns.

public double ColumnSpacing { get; set; }

Property Value

double:

The spacing between columns. The default value is 10.0.

FooterTemplate

Gets or sets the DataTemplate to use for a footer.

public DataTemplate FooterTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use for a footer.

HasFooter

Gets whether the board should display a footer.

public bool HasFooter { get; }

Property Value

bool:

true if the board should display a footer; otherwise, false.

ItemFooterTemplate

Gets or sets the DataTemplate to use for column footers.

public DataTemplate ItemFooterTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use for column footers.

ItemFooterTemplateSelector

Gets or sets the DataTemplateSelector to use for column footers.

public DataTemplateSelector ItemFooterTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for column footers.

ItemHeaderTemplate

Gets or sets the DataTemplate to use for column headers.

public DataTemplate ItemHeaderTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use for column headers.

ItemHeaderTemplateSelector

Gets or sets the DataTemplateSelector to use for column headers.

public DataTemplateSelector ItemHeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for column headers.

Methods

ClearContainerForItemOverride(DependencyObject, object)

protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

The System.Windows.DependencyObject that is the wrapper element.

item object

The item that is being wrapped.

GetContainerForItemOverride()

Creates or identifies the element used to display the specified item.

protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject:

The element that is used to display the given item.

HitTestForColumn(Point)

Hit tests the specified location for a TaskColumn that is under it.

public TaskColumn HitTestForColumn(Point location)
Parameter Type Description
location Point

The System.Windows.Point location, relative to this board.

Returns

TaskColumn:

The TaskColumn that is under the location, if any.

IsItemItsOwnContainerOverride(object)

Determines if the specified item is (or is eligible to be) its own item container.

protected override bool IsItemItsOwnContainerOverride(object item)
Parameter Type Description
item object

Specified item.

Returns

bool:

true if the item is its own item container; otherwise, false.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Occurs when the Items collection changes.

protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameter Type Description
e NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs that contains the event data.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

The System.Windows.DependencyObject that is the wrapper element.

item object

The item that is being wrapped.

Events

CardDragOver

Occurs when a TaskCard is dragged over another column or card.

public event EventHandler<TaskCardEventArgs> CardDragOver

Event Type

EventHandler<TaskCardEventArgs>

CardDragging

Occurs before a TaskCard is starting to be dragged.

public event EventHandler<TaskCardEventArgs> CardDragging

Event Type

EventHandler<TaskCardEventArgs>

CardDropped

Occurs after a TaskCard is dropped at a new location.

public event EventHandler<TaskCardEventArgs> CardDropped

Event Type

EventHandler<TaskCardEventArgs>

CardTapped

Occurs when a TaskCard is tapped.

public event EventHandler<TaskCardEventArgs> CardTapped

Event Type

EventHandler<TaskCardEventArgs>

ColumnDragOver

Occurs when a TaskColumn is dragged over a column.

public event EventHandler<TaskColumnEventArgs> ColumnDragOver

Event Type

EventHandler<TaskColumnEventArgs>

ColumnDragging

Occurs before a TaskColumn is starting to be dragged.

public event EventHandler<TaskColumnEventArgs> ColumnDragging

Event Type

EventHandler<TaskColumnEventArgs>

ColumnDropped

Occurs after a TaskColumn is dropped at a new location.

public event EventHandler<TaskColumnEventArgs> ColumnDropped

Event Type

EventHandler<TaskColumnEventArgs>

Fields

CanCardsDragProperty

Identifies the CanCardsDrag dependency property. This field is read-only.

public static readonly DependencyProperty CanCardsDragProperty

CanColumnsDragProperty

Identifies the CanColumnsDrag dependency property. This field is read-only.

public static readonly DependencyProperty CanColumnsDragProperty

CardContainerStyleProperty

Identifies the CardContainerStyle dependency property. This field is read-only.

public static readonly DependencyProperty CardContainerStyleProperty

CardContainerStyleSelectorProperty

Identifies the CardContainerStyleSelector dependency property. This field is read-only.

public static readonly DependencyProperty CardContainerStyleSelectorProperty

CardCornerRadiusProperty

Identifies the CardCornerRadius dependency property. This field is read-only.

public static readonly DependencyProperty CardCornerRadiusProperty

CardDragRotationAngleProperty

Identifies the CardDragRotationAngle dependency property. This field is read-only.

public static readonly DependencyProperty CardDragRotationAngleProperty

CardSpacingProperty

Identifies the CardSpacing dependency property. This field is read-only.

public static readonly DependencyProperty CardSpacingProperty

CardTemplateProperty

Identifies the CardTemplate dependency property. This field is read-only.

public static readonly DependencyProperty CardTemplateProperty

CardTemplateSelectorProperty

Identifies the CardTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty CardTemplateSelectorProperty

ColumnCornerRadiusProperty

Identifies the ColumnCornerRadius dependency property. This field is read-only.

public static readonly DependencyProperty ColumnCornerRadiusProperty

ColumnDragRotationAngleProperty

Identifies the ColumnDragRotationAngle dependency property. This field is read-only.

public static readonly DependencyProperty ColumnDragRotationAngleProperty

ColumnItemsSourcePathProperty

Identifies the ColumnItemsSourcePath dependency property. This field is read-only.

public static readonly DependencyProperty ColumnItemsSourcePathProperty

ColumnPaddingProperty

Identifies the ColumnPadding dependency property. This field is read-only.

public static readonly DependencyProperty ColumnPaddingProperty

ColumnSpacingProperty

Identifies the ColumnSpacing dependency property. This field is read-only.

public static readonly DependencyProperty ColumnSpacingProperty

FooterTemplateProperty

Identifies the FooterTemplate dependency property. This field is read-only.

public static readonly DependencyProperty FooterTemplateProperty

HasFooterProperty

Identifies the HasFooter dependency property. This field is read-only.

public static readonly DependencyProperty HasFooterProperty

ItemFooterTemplateProperty

Identifies the ItemFooterTemplate dependency property. This field is read-only.

public static readonly DependencyProperty ItemFooterTemplateProperty

ItemFooterTemplateSelectorProperty

Identifies the ItemFooterTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty ItemFooterTemplateSelectorProperty

ItemHeaderTemplateProperty

Identifies the ItemHeaderTemplate dependency property. This field is read-only.

public static readonly DependencyProperty ItemHeaderTemplateProperty

ItemHeaderTemplateSelectorProperty

Identifies the ItemHeaderTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty ItemHeaderTemplateSelectorProperty