In This Article

TaskBoard Class

Represents a task board.

public class TaskBoard : ItemsControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object

Constructors

TaskBoard()

Initializes an instance of the class.

public TaskBoard()

Properties

CanCardsDrag

Indicates 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

Indicates 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

The Style to use for card containers.

public Style? CardContainerStyle { get; set; }

Property Value

Style

CardContainerStyleSelector

The StyleSelector to use for card containers.

public StyleSelector? CardContainerStyleSelector { get; set; }

Property Value

StyleSelector

CardCornerRadius

The card corner radius.

public CornerRadius CardCornerRadius { get; set; }

Property Value

CornerRadius:

The default value is 3.0.

CardDragRotationAngle

The angle at which cards should be rotated when dragged.

public double CardDragRotationAngle { get; set; }

Property Value

double:

The default value is 3 degrees. Set the property to 0 to prevent rotation.

CardSpacing

The spacing between cards.

public double CardSpacing { get; set; }

Property Value

double:

The default value is 7.0.

CardTemplate

The DataTemplate to use for cards.

public DataTemplate? CardTemplate { get; set; }

Property Value

DataTemplate

CardTemplateSelector

The DataTemplateSelector to use for cards.

public DataTemplateSelector? CardTemplateSelector { get; set; }

Property Value

DataTemplateSelector

ColumnCornerRadius

The column corner radius.

public CornerRadius ColumnCornerRadius { get; set; }

Property Value

CornerRadius:

The default value is 3.0.

ColumnDragRotationAngle

The angle at which columns should be rotated when dragged.

public double ColumnDragRotationAngle { get; set; }

Property Value

double:

The default value is 3 degrees. Set the property to 0 to prevent rotation.

ColumnItemsSourcePath

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

ColumnPadding

The column padding.

public Thickness ColumnPadding { get; set; }

Property Value

Thickness:

The default value is 7.0.

ColumnSpacing

The spacing between columns.

public double ColumnSpacing { get; set; }

Property Value

double:

The default value is 10.0.

FooterTemplate

The DataTemplate to use for a footer.

public DataTemplate? FooterTemplate { get; set; }

Property Value

DataTemplate

HasFooter

Indicates 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

The DataTemplate to use for column footers.

public DataTemplate? ItemFooterTemplate { get; set; }

Property Value

DataTemplate

ItemFooterTemplateSelector

The DataTemplateSelector to use for column footers.

public DataTemplateSelector? ItemFooterTemplateSelector { get; set; }

Property Value

DataTemplateSelector

ItemHeaderTemplate

The DataTemplate to use for column headers.

public DataTemplate? ItemHeaderTemplate { get; set; }

Property Value

DataTemplate

ItemHeaderTemplateSelector

The DataTemplateSelector to use for column headers.

public DataTemplateSelector? ItemHeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Methods

ClearContainerForItemOverride(DependencyObject, object)

When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride(DependencyObject, object) method.

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

The container element.

item object

The item.

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given 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 container.

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

The item to check.

Returns

bool:

true if the item is (or is eligible to be) its own container; otherwise, false.

OnApplyTemplate()

When overridden in a derived class, is 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)

Invoked when the Items property changes.

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

Information about the change.

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

Element used to display the specified item.

item object

Specified item.

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

Defines the CanCardsDrag property.

public static readonly DependencyProperty CanCardsDragProperty

CanColumnsDragProperty

Defines the CanColumnsDrag property.

public static readonly DependencyProperty CanColumnsDragProperty

CardContainerStyleProperty

Defines the CardContainerStyle property.

public static readonly DependencyProperty CardContainerStyleProperty

CardContainerStyleSelectorProperty

Defines the CardContainerStyleSelector property.

public static readonly DependencyProperty CardContainerStyleSelectorProperty

CardCornerRadiusProperty

Defines the CardCornerRadius property.

public static readonly DependencyProperty CardCornerRadiusProperty

CardDragRotationAngleProperty

Defines the CardDragRotationAngle property.

public static readonly DependencyProperty CardDragRotationAngleProperty

CardSpacingProperty

Defines the CardSpacing property.

public static readonly DependencyProperty CardSpacingProperty

CardTemplateProperty

Defines the CardTemplate property.

public static readonly DependencyProperty CardTemplateProperty

CardTemplateSelectorProperty

Defines the CardTemplateSelector property.

public static readonly DependencyProperty CardTemplateSelectorProperty

ColumnCornerRadiusProperty

Defines the ColumnCornerRadius property.

public static readonly DependencyProperty ColumnCornerRadiusProperty

ColumnDragRotationAngleProperty

Defines the ColumnDragRotationAngle property.

public static readonly DependencyProperty ColumnDragRotationAngleProperty

ColumnItemsSourcePathProperty

Defines the ColumnItemsSourcePath property.

public static readonly DependencyProperty ColumnItemsSourcePathProperty

ColumnPaddingProperty

Defines the ColumnPadding property.

public static readonly DependencyProperty ColumnPaddingProperty

ColumnSpacingProperty

Defines the ColumnSpacing property.

public static readonly DependencyProperty ColumnSpacingProperty

FooterTemplateProperty

Defines the FooterTemplate property.

public static readonly DependencyProperty FooterTemplateProperty

HasFooterProperty

Defines the HasFooter property.

public static readonly DependencyProperty HasFooterProperty

ItemFooterTemplateProperty

Defines the ItemFooterTemplate property.

public static readonly DependencyProperty ItemFooterTemplateProperty

ItemFooterTemplateSelectorProperty

Defines the ItemFooterTemplateSelector property.

public static readonly DependencyProperty ItemFooterTemplateSelectorProperty

ItemHeaderTemplateProperty

Defines the ItemHeaderTemplate property.

public static readonly DependencyProperty ItemHeaderTemplateProperty

ItemHeaderTemplateSelectorProperty

Defines the ItemHeaderTemplateSelector property.

public static readonly DependencyProperty ItemHeaderTemplateSelectorProperty

Extension Methods