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:
trueif cards can be dragged and reordered; otherwise,false. The default value istrue.
CanColumnsDrag
Indicates whether columns can be dragged and reordered.
public bool CanColumnsDrag { get; set; }
Property Value
- bool:
trueif columns can be dragged and reordered; otherwise,false. The default value istrue.
CardContainerStyle
The Style to use for card containers.
CardContainerStyleSelector
The StyleSelector to use for card containers.
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
3degrees. Set the property to0to prevent rotation.
CardSpacing
The spacing between cards.
CardTemplate
The DataTemplate to use for cards.
CardTemplateSelector
The DataTemplateSelector to use for cards.
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
3degrees. Set the property to0to prevent rotation.
ColumnItemsSourcePath
The name of the property on the columns view model that provides the items source for the cards.
ColumnPadding
The column padding.
ColumnSpacing
The spacing between columns.
FooterTemplate
The DataTemplate to use for a footer.
HasFooter
Indicates whether the board should display a footer.
public bool HasFooter { get; }
Property Value
- bool:
trueif the board should display a footer; otherwise,false.
ItemFooterTemplate
The DataTemplate to use for column footers.
ItemFooterTemplateSelector
The DataTemplateSelector to use for column footers.
public DataTemplateSelector? ItemFooterTemplateSelector { get; set; }
Property Value
ItemHeaderTemplate
The DataTemplate to use for column headers.
ItemHeaderTemplateSelector
The DataTemplateSelector to use for column headers.
public DataTemplateSelector? ItemHeaderTemplateSelector { get; set; }
Property Value
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:
trueif 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
CardDragging
Occurs before a TaskCard is starting to be dragged.
public event EventHandler<TaskCardEventArgs>? CardDragging
Event Type
CardDropped
Occurs after a TaskCard is dropped at a new location.
public event EventHandler<TaskCardEventArgs>? CardDropped
Event Type
CardTapped
Occurs when a TaskCard is tapped.
ColumnDragOver
Occurs when a TaskColumn is dragged over a column.
public event EventHandler<TaskColumnEventArgs>? ColumnDragOver
Event Type
ColumnDragging
Occurs before a TaskColumn is starting to be dragged.
public event EventHandler<TaskColumnEventArgs>? ColumnDragging
Event Type
ColumnDropped
Occurs after a TaskColumn is dropped at a new location.
public event EventHandler<TaskColumnEventArgs>? ColumnDropped
Event Type
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