TaskBoard
A task board: the plan as cards in columns – one column for each stage of the work, one card for each task – with optional lanes across the board by assignee, category or phase, and cards that move with the mouse or the keyboard.
public partial class TaskBoard : Control
Inherits from / implements: Control
Remarks
Use it for the day-to-day running of a plan: what is waiting, what is in hand, what is done,
and who has what. Because it reads the same plan as a GanttChart and a
PertChart, every card also knows its finish date and whether it is on the critical
path.
Columns and lanes are fields of the task
A column is a value of ProjectTask.Status, and a lane is a value of the field
LaneBy names – ProjectTask.Assignee, ProjectTask.Category,
or the top-level summary a task sits in. So moving a card is nothing more than changing those fields
on your own task object, and a Gantt chart given the same Tasks sees the move at once.
The order of cards within a column is ProjectTask.Rank, which nothing else reads, so
tidying a board never moves a date. Summary tasks are not cards: on a board, structure is what lanes
are for.
Columns
Describe the workflow in Columns, each a BoardColumn with a
status, an optional heading and an optional work-in-progress limit. Leave it empty and the board
makes a column for each status the tasks use; with none at all it shows To do, In progress and Done.
A task whose status has no column is shown in the first. A column over its limit says so in its
heading, and StrictLimits refuses cards to a column that is full.
Moving cards
Drag a card with the mouse, a pen or a finger; the board scrolls when a card is carried to its
edge. From the keyboard, the arrows move between cards and Space picks the current one up; the
arrows then carry it – Up and Down within its column, Left and Right between columns, Shift with Up
and Down between lanes – and Space or Enter drops it, or Esc puts it back. Every move, however it is
made and including MoveCard, is offered first through CardMoving, which
can cancel it, and announced by CardMoved; each step of a keyboard move is also said
aloud to a screen reader. IsReadOnly stops the reader moving cards.
What a card shows
The task's name on up to two lines, its finish date (after a diamond for a milestone), the
assignee's initials in a badge, a progress strip along the foot, and – with
ShowCriticalPath on – a stripe in CriticalBrush down the leading edge of
a critical task. Double-click a card, or press Enter on it, to raise
TaskActivated.
Appearance
The board draws itself and has no template. Cards take Control.Background unless
CardBackgroundBrush is set, text takes Control.Foreground and the font,
and dates are written in the culture of FrameworkElement.Language when it is set,
otherwise the current culture. In Windows high contrast the system colours replace every brush. With
FrameworkElement.FlowDirection right to left the first column is on the right and the
arrow keys follow.
Examples
A board for a website relaunch, with a limit of three cards in progress and a lane for each
person. The Tasks and Links are the same collections a Gantt chart elsewhere in the
window shows.
<Window x:Class="Planner.BoardWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:pm="clr-namespace:Binarymission.WPF.Controls.ProjectManagement;assembly=Binarymission.WPF.Controls.ProjectManagement"
Title="Relaunch board" Width="1100" Height="700">
<pm:TaskBoard x:Name="board"
Tasks="{Binding Tasks}"
Links="{Binding Links}"
ProjectStart="2026-11-02"
LaneBy="Assignee"
StrictLimits="True"
ColumnWidth="240"
CardMoving="OnCardMoving"
CardMoved="OnCardMoved">
<pm:TaskBoard.Columns>
<pm:BoardColumn Status="Backlog" />
<pm:BoardColumn Status="Doing" Header="In progress" Limit="3" />
<pm:BoardColumn Status="Review" Limit="2" />
<pm:BoardColumn Status="Done" />
</pm:TaskBoard.Columns>
</pm:TaskBoard>
</Window>The code-behind: a rule the application keeps, and saving the task once it has moved.
private void OnCardMoving(object sender, CardMovingEventArgs e)
{
// Only finished work can be passed for review.
if (e.ToStatus == "Review" && e.Task.Progress < 100)
{
e.Cancel = true;
MessageBox.Show(e.Task.Name + " is " + e.Task.Progress + "% done; finish it before review.");
}
}
private void OnCardMoved(object sender, TaskEventArgs e)
{
// Status, Assignee and Rank are already set on the task: store it.
repository.Save(e.Task);
}See also
Members at a glance
| Constructors | |
|---|---|
TaskBoard | Creates an empty task board, with empty Tasks, Links,
Holidays and Columns collections of its own and no lanes. |
| Properties | |
BadgeBrush | Gets or sets the fill of the disc that shows the assignee's initials at the foot of a card. |
CardBackgroundBrush | Gets or sets the fill of every card. |
CardBorderBrush | Gets or sets the outline of a card that is not selected, and – fainter – the track behind its progress strip. |
CardHeight | Gets or sets the height of every card. |
ColumnBackgroundBrush | Gets or sets the fill behind each column, from its heading to the foot of the board. |
ColumnWidth | Gets or sets the width of every column, and so of every card in it. |
Columns | Gets or sets the board's columns, in order: each a ProjectTask.Status value,
with an optional heading and work-in-progress limit. |
CriticalBrush | Gets or sets the colour of the stripe down the leading edge of a card on the critical path,
while ShowCriticalPath is on. |
Holidays | Gets or sets the dates that are not worked, beside the days WorkingWeek
leaves out. |
IsReadOnly | Gets or sets whether the reader can only look at the board and not move cards. |
LaneBy | Gets or sets what the board's rows, its lanes, stand for: nothing, the assignee, the category, or the phase – the top-level summary a task sits in. |
Links | Gets or sets the links between the tasks, which decide each card's finish date and whether it is critical. |
OverLimitBrush | Gets or sets the colour of a column's count, and a bar under its heading, while it holds
more cards than its BoardColumn.Limit; and of the outline of a carried card over a
column that would refuse it. |
ProgressBrush | Gets or sets the fill of the progress strip along the foot of a card, which fills from the
leading edge with the task's ProjectTask.Progress. |
ProjectStart | Gets or sets the first day work on the plan can happen, from which the cards' finish dates are worked out. |
Schedule | Gets the plan as scheduled: every task's dates and float, the critical path, and what in the input could not be used. |
SelectedTask | Gets or sets the selected task: the outlined card, which the arrow keys move from and Space picks up. |
SelectionBrush | Gets or sets the outline of the selected card and of a card being carried, and the mark showing where a carried card would land. |
ShowCriticalPath | Gets or sets whether each card on the critical path has a stripe in
CriticalBrush down its leading edge. |
StrictLimits | Gets or sets whether a column's work-in-progress limit is enforced, refusing a card to a column that is already full. |
Tasks | Gets or sets the tasks of the plan: a flat list in outline order, in which a subtask names
its summary through ProjectTask.ParentId. |
Today | Gets or sets the date the charts treat as today. A board has no timeline and draws nothing for it. |
VisualChildrenCount | Gets the number of child elements: the vertical and the horizontal scroll bar. Everything else is drawn. |
WorkingWeek | Gets or sets the days of the week on which work happens. |
| Methods | |
ArrangeOverride | Places the scroll bars, which appear only when the board is larger than its view, and carries out a scroll asked for before the board had a size. |
GetEnumerator | Gets the two scroll bars, as logical children, so that they take the board's resources and styles. |
GetVisualChild | Returns one of the two scroll bars. |
MeasureOverride | Asks for the whole board's size – every column, and every lane with its cards – or for the room available when that is less. |
MoveCard | Moves a task's card, exactly as the reader would: CardMoving is raised first
and can cancel it, StrictLimits applies, and CardMoved
follows. |
OnCreateAutomationPeer | Gives UI Automation the board as a list of column headings and cards, so that a screen reader can read the board and follow a card being moved. |
OnDpiChanged | Redraws for a new display scale, so that text is measured for the pixels it lands on. |
OnGotKeyboardFocus | Shows the focus cue and tells a screen reader which card is current. |
OnKeyDown | Carries out the board's keys. With no card carried: the arrows, Home and End move between cards, Space picks the current card up, Enter activates it, and Page Up and Page Down scroll. While a card is carried: the arrows carry it, Space or Enter drops it, and Esc puts it back. |
OnLostKeyboardFocus | Puts back a card carried from the keyboard when the board loses the focus, since the reader can no longer see or steer where it would go. |
OnLostMouseCapture | Ends a drag without a move when something else takes the mouse – a window coming to the front, or the application capturing it. |
OnMouseLeave | Hides the tooltip when the pointer leaves the board. |
OnMouseLeftButtonDown | Selects the card under the pointer, raising TaskActivated on a double-click;
a drag can follow. A press while a card is carried from the keyboard puts that card back. |
OnMouseLeftButtonUp | Drops a dragged card where the pointer is, through CardMoving. A press that
never became a drag was just a click. |
OnMouseMove | Picks a pressed card up once the pointer has moved the system's drag distance, then carries it, scrolling at the edge of the view; otherwise shows, after the hover time, a tooltip describing the card under the pointer. |
OnMouseWheel | Scrolls up and down, 48 logical units a notch; with Shift, scrolls sideways. |
OnPropertyChanged | Redraws when a setting the drawing reads from the control itself changes: the font,
Foreground, Background,
FrameworkElement.Language, FrameworkElement.FlowDirection or the text
formatting mode. |
OnQueryCursor | Shows a hand over a card that can be moved and while one is dragged, and the "not allowed" cursor over a place that would refuse the card. |
OnRender | Draws the board: the column headings, fixed above the scrolling lanes and cards, then a dragged card's copy over both. |
Reschedule | Schedules the plan again now and lays the board out again. |
ScrollToTask | Scrolls the board, as little as it needs to, so that a task's card is in view below the column headings. |
| Events | |
CardMoved | Occurs after a card has moved and its task's fields have been changed. |
CardMoving | Occurs when a card is about to move – dropped by the pointer or the keyboard, or moved by
MoveCard – before anything has changed. Cancel it to keep the card where it
is. |
ScheduleChanged | Occurs after the plan has been scheduled again because something changed: a task, a link, one of the lists, or a scheduling setting. |
SelectedTaskChanged | Occurs when SelectedTask changes: the reader chose another card, the
application set the property, or the selected task left the board. |
TaskActivated | Occurs when the reader asks to open a task: by double-clicking its card, or by pressing Enter on the current card when none is being carried. |
| Fields | |
BadgeBrushProperty | Identifies the BadgeBrush dependency property. |
CardBackgroundBrushProperty | Identifies the CardBackgroundBrush dependency property. |
CardBorderBrushProperty | Identifies the CardBorderBrush dependency property. |
CardHeightProperty | Identifies the CardHeight dependency property. |
ColumnBackgroundBrushProperty | Identifies the ColumnBackgroundBrush dependency property. |
ColumnWidthProperty | Identifies the ColumnWidth dependency property. |
ColumnsProperty | Identifies the Columns dependency property. |
CriticalBrushProperty | Identifies the CriticalBrush dependency property. |
HolidaysProperty | Identifies the Holidays dependency property. |
IsReadOnlyProperty | Identifies the IsReadOnly dependency property. |
LaneByProperty | Identifies the LaneBy dependency property. |
LinksProperty | Identifies the Links dependency property. |
OverLimitBrushProperty | Identifies the OverLimitBrush dependency property. |
ProgressBrushProperty | Identifies the ProgressBrush dependency property. |
ProjectStartProperty | Identifies the ProjectStart dependency property. |
SelectedTaskProperty | Identifies the SelectedTask dependency property. |
SelectionBrushProperty | Identifies the SelectionBrush dependency property. |
ShowCriticalPathProperty | Identifies the ShowCriticalPath dependency property. |
StrictLimitsProperty | Identifies the StrictLimits dependency property. |
TasksProperty | Identifies the Tasks dependency property. |
TodayProperty | Identifies the Today dependency property. |
WorkingWeekProperty | Identifies the WorkingWeek dependency property. |
Constructors
TaskBoard
Creates an empty task board, with empty Tasks, Links,
Holidays and Columns collections of its own and no lanes.
Remarks
Each board gets collections of its own, so a column added to one board is never added to another. To share a plan, give several boards and charts the same task and link lists.
Properties
BadgeBrush
Gets or sets the fill of the disc that shows the assignee's initials at the foot of a card.
- Value
- The default is a slate blue,
#4C6A92, under white initials.nulluses the system highlight colour.
Remarks
The initials are always white, so choose a fill they read on. A card whose task has no
ProjectTask.Assignee has no badge. In Windows high contrast the system colours are used instead.
CardBackgroundBrush
Gets or sets the fill of every card.
- Value
- The default is
null: cards take the board'sBackground, or the system window colour when that is not set, so they follow a light or a dark theme.
Remarks
A card's text is drawn in Foreground; choose a fill it reads on.
In Windows high contrast the system colours are used instead.
CardBorderBrush
Gets or sets the outline of a card that is not selected, and – fainter – the track behind its progress strip.
- Value
- The default is a light grey,
#A9B4BF.nulluses the system's dark control colour.
Remarks
In Windows high contrast the system colours are used instead.
CardHeight
Gets or sets the height of every card.
- Value
- In logical units (1/96 inch). The default is 76, which holds two lines of name above the finish date and the assignee's badge. A card is never drawn shorter than 52, which holds one line of name.
Remarks
A negative value, NaN or an infinity is refused with an
ArgumentException.
ColumnBackgroundBrush
Gets or sets the fill behind each column, from its heading to the foot of the board.
- Value
- The default is a faint grey at 10% opacity (
#1A7F8C99), which tints a light or a dark background alike.nullleaves columns untinted.
Remarks
In Windows high contrast the system colours are used instead.
Example
<pm:TaskBoard Background="#F7F8FA" ColumnBackgroundBrush="#EEF1F5" CardBackgroundBrush="White"
CardBorderBrush="#D0D7DE" BadgeBrush="#1565C0" OverLimitBrush="#C62828" />ColumnWidth
Gets or sets the width of every column, and so of every card in it.
- Value
- In logical units (1/96 inch). The default is 260. A column is never drawn narrower than 180, the room a card's name needs.
Remarks
The board scrolls sideways when its columns are wider than it is. A negative value,
NaN or an infinity is refused with an
ArgumentException.
Columns
Gets or sets the board's columns, in order: each a ProjectTask.Status value,
with an optional heading and work-in-progress limit.
- Value
- The columns. The default is an empty collection of the board's own; setting
nullgives a new empty one, so it is nevernull.
Remarks
Empty, the board makes a column for each status the tasks use, in the order they first appear, or To do, In progress and Done when no task has one. A column with no status, or a status already used, is ignored. A task whose status has no column is shown in the first column, so no card is ever off the board.
Adding, removing and replacing columns is seen at once and puts back a card being carried. A
BoardColumn does not say when its own properties change; replace it, or call
Reschedule.
Example
board.Columns.Add(new BoardColumn("Backlog"));
board.Columns.Add(new BoardColumn("Doing", 3) { Header = "In progress" });
board.Columns.Add(new BoardColumn("Done"));See also
CriticalBrush
Gets or sets the colour of the stripe down the leading edge of a card on the critical path,
while ShowCriticalPath is on.
- Value
- The default is a red-orange,
#E0512B.nulluses the system's hot-track colour.
Remarks
In Windows high contrast the system colours are used instead.
Holidays
Gets or sets the dates that are not worked, beside the days WorkingWeek
leaves out.
- Value
- Only the date part of each is read. The default is an empty list of the board's own; setting
nullgives a new empty one.
Remarks
An ObservableCollection is watched. Give every view of a plan the same
holidays.
IsReadOnly
Gets or sets whether the reader can only look at the board and not move cards.
- Value
- The default is
false.
Remarks
Cards can still be selected, activated and read, and MoveCard still moves
them. Turning it on puts back a card being carried.
LaneBy
Gets or sets what the board's rows, its lanes, stand for: nothing, the assignee, the category, or the phase – the top-level summary a task sits in.
- Value
- The default is
BoardLaneBy.None: one lane, so the board is just columns.
Remarks
There is a lane for each value the tasks have, and a last one, labelled Unassigned, Uncategorised or No phase, for tasks without. Phases are in plan order; other lanes in the order their values first appear.
A card moved to another lane takes that lane's value: its ProjectTask.Assignee
or ProjectTask.Category, or by phase its ProjectTask.ParentId, which
becomes the phase's id – so a task nested deeper in the phase is moved to its top level. Into the
lane for tasks without a value, the field is set to null. Changing it puts back a
card being carried.
Links
Gets or sets the links between the tasks, which decide each card's finish date and whether it is critical.
- Value
- The default is an empty list of the board's own; setting
nullgives a new empty one.
Remarks
The board never changes the links. Give it the same list as the Gantt chart, or its dates will disagree with the chart's.
OverLimitBrush
Gets or sets the colour of a column's count, and a bar under its heading, while it holds
more cards than its BoardColumn.Limit; and of the outline of a carried card over a
column that would refuse it.
- Value
- The default is a deep orange,
#D9480F.nulluses the system's hot-track colour.
Remarks
In Windows high contrast the system colours are used instead.
See also
ProgressBrush
Gets or sets the fill of the progress strip along the foot of a card, which fills from the
leading edge with the task's ProjectTask.Progress.
- Value
- The default is a calm blue,
#3B7DD8.nulluses the system highlight colour.
Remarks
In Windows high contrast the system colours are used instead.
ProjectStart
Gets or sets the first day work on the plan can happen, from which the cards' finish dates are worked out.
- Value
- The first possible day, or
nullto start at the earliest planned date among the tasks, or today when none has one. The default isnull.
Schedule
Gets the plan as scheduled: every task's dates and float, the critical path, and what in the input could not be used.
- Value
- The current schedule; never
null.
Remarks
The plan is scheduled again first when anything has changed. A board that is not loaded schedules afresh each time this is read.
SelectedTask
Gets or sets the selected task: the outlined card, which the arrow keys move from and Space picks up.
- Value
- A task that is a card on the board, or
nullfor none; the default. It binds two-way by default.
Remarks
Setting a summary, or a task not in Tasks, outlines no card, and the property
is cleared the next time the plan is scheduled. When the list is replaced, the selection moves to
the task that now has the selected task's id, if there is one. Selecting does not scroll; call
ScrollToTask for that.
SelectionBrush
Gets or sets the outline of the selected card and of a card being carried, and the mark showing where a carried card would land.
- Value
- The default is
null: the system highlight colour.
Remarks
In Windows high contrast the system colours are used instead.
ShowCriticalPath
Gets or sets whether each card on the critical path has a stripe in
CriticalBrush down its leading edge.
- Value
- The default is
true.
Remarks
A critical task is one with no float: a day lost on it is a day lost on the whole plan.
StrictLimits
Gets or sets whether a column's work-in-progress limit is enforced, refusing a card to a column that is already full.
- Value
trueto refuse;false, the default, to let a column go over its limit and say so in its heading, inOverLimitBrush.
Remarks
A column is full when it holds BoardColumn.Limit cards, counted across every
lane; a column with no limit is never full, and reordering within a column is always allowed. A
refused drop leaves the card where it was, without raising CardMoving, and applies to
MoveCard too. A card carried over a full column shows that it would be
refused.
Tasks
Gets or sets the tasks of the plan: a flat list in outline order, in which a subtask names
its summary through ProjectTask.ParentId.
- Value
- The tasks to show. The default is an empty list of the board's own; setting
nullgives a new empty list, so it is nevernull.
Remarks
Every task with no subtasks is a card; summaries are not. While the board is loaded, an
ObservableCollection or a BindingList<T> is watched, and so is every
task in it, so a status changed anywhere moves the card. A plain List<T> is read when
assigned; call Reschedule after changing one. Assigning a new list puts back a card
being carried.
Example
board.Tasks.Add(new ProjectTask("bug-212", "Basket total rounds wrongly", 1)
{
Status = "Backlog",
Assignee = "Ana Ruiz",
Category = "Defect",
});Today
Gets or sets the date the charts treat as today. A board has no timeline and draws nothing for it.
- Value
- The default is
null, the computer's date.
Remarks
It is here so that the same settings can be given to a GanttChart, which
draws its today line there, a PertChart and a board alike.
VisualChildrenCount
Gets the number of child elements: the vertical and the horizontal scroll bar. Everything else is drawn.
- Value
- Always 2.
WorkingWeek
Gets or sets the days of the week on which work happens.
- Value
- The default is
WorkingWeek.Weekdays, Monday to Friday;WorkingWeek.Noneis read as every day.
Methods
ArrangeOverride
Places the scroll bars, which appear only when the board is larger than its view, and carries out a scroll asked for before the board had a size.
Parameters
arrangeBounds- The size the board has been given.
Returns
arrangeBounds: the board uses all of it.
GetEnumerator
Gets the two scroll bars, as logical children, so that they take the board's resources and styles.
- Value
- An enumerator over the vertical and the horizontal scroll bar.
GetVisualChild
Returns one of the two scroll bars.
Parameters
index- 0 for the vertical scroll bar, 1 for the horizontal one.
Returns
The scroll bar.
Exceptions
ArgumentOutOfRangeExceptionindexis not 0 or 1.
MeasureOverride
Asks for the whole board's size – every column, and every lane with its cards – or for the room available when that is less.
Parameters
constraint- The room available, in logical units; either side may be infinite.
Returns
The size wanted.
MoveCard
Moves a task's card, exactly as the reader would: CardMoving is raised first
and can cancel it, StrictLimits applies, and CardMoved
follows.
Parameters
task- The task whose card moves. It must be a card on the board: not a summary, and in
Tasks. status- The column to move it to: the
BoardColumn.Statusof one of the board's columns. lane- The lane: the value of the
LaneByfield, empty for the lane of tasks without one, ornullto keep its lane. A value no lane has yet is written to the task as it is, which makes a new lane; by phase it should be the id of a top-level summary. Ignored whenLaneByisBoardLaneBy.None. index- Its position among the cards in that column and lane, from 0. A negative number, or one past the end, puts it last.
Returns
true when the card moved; false when the task is not a
card, the column does not exist, the card is already there, the column is full under
StrictLimits, or a handler cancelled the move.
Remarks
The move is reported with TaskEditSource.Application as its source, and works
whether or not IsReadOnly is set.
Example
// Hand the orders API to Sam and put it at the top of his In progress cards.
bool moved = board.MoveCard(apiTask, "Doing", "Sam Okafor", 0);OnCreateAutomationPeer
Gives UI Automation the board as a list of column headings and cards, so that a screen reader can read the board and follow a card being moved.
Returns
The board's automation peer.
Remarks
A heading is named with its column, its count and its limit; a card with its task, column
and lane, and it can be selected, scrolled into view and invoked, which raises
TaskActivated. Picking a card up, carrying it and dropping it are announced through a
live region.
OnDpiChanged
Redraws for a new display scale, so that text is measured for the pixels it lands on.
Parameters
oldDpi- The scale before.
newDpi- The scale now.
OnGotKeyboardFocus
Shows the focus cue and tells a screen reader which card is current.
Parameters
e- The event data.
OnKeyDown
Carries out the board's keys. With no card carried: the arrows, Home and End move between cards, Space picks the current card up, Enter activates it, and Page Up and Page Down scroll. While a card is carried: the arrows carry it, Space or Enter drops it, and Esc puts it back.
Parameters
e- The key. Every arrow is marked handled, even at the edge of the board, so it never moves the focus out of the board.
Remarks
Up and Down run through a column and on into the next lane; Left and Right go to the
neighbouring column, in the same lane where it has cards; Home and End go to the first and last card
of the column. A carried card moves one place within its cell with Up and Down, one column with Left
and Right, and one lane with Shift and Up or Down. With FrameworkElement.FlowDirection
right to left, Left and Right swap. Space does nothing while IsReadOnly is
set.
OnLostKeyboardFocus
Puts back a card carried from the keyboard when the board loses the focus, since the reader can no longer see or steer where it would go.
Parameters
e- The event data.
OnLostMouseCapture
Ends a drag without a move when something else takes the mouse – a window coming to the front, or the application capturing it.
Parameters
e- The event data.
OnMouseLeave
Hides the tooltip when the pointer leaves the board.
Parameters
e- The event data.
OnMouseLeftButtonDown
Selects the card under the pointer, raising TaskActivated on a double-click;
a drag can follow. A press while a card is carried from the keyboard puts that card back.
Parameters
e- The press.
OnMouseLeftButtonUp
Drops a dragged card where the pointer is, through CardMoving. A press that
never became a drag was just a click.
Parameters
e- The release.
OnMouseMove
Picks a pressed card up once the pointer has moved the system's drag distance, then carries it, scrolling at the edge of the view; otherwise shows, after the hover time, a tooltip describing the card under the pointer.
Parameters
e- The move.
OnMouseWheel
Scrolls up and down, 48 logical units a notch; with Shift, scrolls sideways.
Parameters
e- The wheel turn.
OnPropertyChanged
Redraws when a setting the drawing reads from the control itself changes: the font,
Foreground, Background,
FrameworkElement.Language, FrameworkElement.FlowDirection or the text
formatting mode.
Parameters
e- The property that changed, with its old and new values.
Remarks
An override should call the base implementation.
OnQueryCursor
Shows a hand over a card that can be moved and while one is dragged, and the "not allowed" cursor over a place that would refuse the card.
Parameters
e- The event data.
OnRender
Draws the board: the column headings, fixed above the scrolling lanes and cards, then a dragged card's copy over both.
Parameters
drawingContext- Where to draw.
Reschedule
Schedules the plan again now and lays the board out again.
Remarks
Needed only after changing a plain List<T> or array, or a task in one, or a
BoardColumn's properties; observable collections and the objects in them are watched.
ScheduleChanged is raised before this returns.
ScrollToTask
Scrolls the board, as little as it needs to, so that a task's card is in view below the column headings.
Parameters
task- The task to show. Nothing happens for
null, a summary, or a task that is not on the board.
Remarks
The selection does not change; set SelectedTask as well to outline the card.
Called before the board has a size, it waits for the first layout.
Events
CardMoved
Occurs after a card has moved and its task's fields have been changed.
Remarks
The task already carries its new ProjectTask.Status, lane field and
ProjectTask.Rank; other cards in the cell it landed in may have new ranks too. Save
the tasks here to keep the move. The plan is scheduled again afterwards, once.
See also
CardMoving
Occurs when a card is about to move – dropped by the pointer or the keyboard, or moved by
MoveCard – before anything has changed. Cancel it to keep the card where it
is.
Remarks
The event data names the task, how the move was made, and where the card is and would go: its
column (CardMovingEventArgs.FromStatus, CardMovingEventArgs.ToStatus),
its lane and its position. A drop where the card already is, or one StrictLimits
refuses, is not offered.
When nobody cancels, the board sets the task's ProjectTask.Status, its lane
field and its ProjectTask.Rank, re-numbers the other cards in the cell it lands in,
and raises CardMoved. This is the one place for rules of your own, such as "only
finished work goes to review", whichever way the card was moved; a reader who used the keyboard
hears that the move was not allowed.
Example
board.CardMoving += (sender, e) =>
{
if (e.FromStatus == "Done" && e.Source != TaskEditSource.Application)
e.Cancel = true; // finished work is not reopened from the board
};See also
ScheduleChanged
Occurs after the plan has been scheduled again because something changed: a task, a link, one of the lists, or a scheduling setting.
Remarks
Changes arriving together – a card move re-ranking a whole column – are scheduled once and
announced once, from the dispatcher, after they have all arrived. Reschedule raises it
before it returns. A board that is not loaded does not raise it; nor does loading one, so read
Schedule when the board is loaded if you need the first result.
SelectedTaskChanged
Occurs when SelectedTask changes: the reader chose another card, the
application set the property, or the selected task left the board.
TaskActivated
Occurs when the reader asks to open a task: by double-clicking its card, or by pressing Enter on the current card when none is being carried.
Remarks
The board does nothing else with it; it is the place to open the task's details. The card is already selected.
Fields
BadgeBrushProperty static
Identifies the BadgeBrush dependency property.
CardBackgroundBrushProperty static
Identifies the CardBackgroundBrush dependency property.
CardBorderBrushProperty static
Identifies the CardBorderBrush dependency property.
CardHeightProperty static
Identifies the CardHeight dependency property.
ColumnBackgroundBrushProperty static
Identifies the ColumnBackgroundBrush dependency property.
ColumnWidthProperty static
Identifies the ColumnWidth dependency property.
ColumnsProperty static
Identifies the Columns dependency property.
CriticalBrushProperty static
Identifies the CriticalBrush dependency property.
HolidaysProperty static
Identifies the Holidays dependency property.
IsReadOnlyProperty static
Identifies the IsReadOnly dependency property.
LaneByProperty static
Identifies the LaneBy dependency property.
LinksProperty static
Identifies the Links dependency property.
OverLimitBrushProperty static
Identifies the OverLimitBrush dependency property.
ProgressBrushProperty static
Identifies the ProgressBrush dependency property.
ProjectStartProperty static
Identifies the ProjectStart dependency property.
SelectedTaskProperty static
Identifies the SelectedTask dependency property.
SelectionBrushProperty static
Identifies the SelectionBrush dependency property.
ShowCriticalPathProperty static
Identifies the ShowCriticalPath dependency property.
StrictLimitsProperty static
Identifies the StrictLimits dependency property.
TasksProperty static
Identifies the Tasks dependency property.
TodayProperty static
Identifies the Today dependency property.
WorkingWeekProperty static
Identifies the WorkingWeek dependency property.