PertChart
A PERT chart: the plan as a network of boxes, one for each piece of work, joined by arrows in the order the work has to happen, each box showing the dates and float the critical-path method gives its task.
public partial class PertChart : Control
Inherits from / implements: Control
Remarks
Use it to see the logic of a plan rather than its calendar: which tasks wait for which, which can run side by side, and which chain of tasks – the critical path – decides when the plan finishes. It is the view to check a plan's dependencies in before committing to its dates.
The plan
The chart reads the same plan as a GanttChart and a TaskBoard:
Tasks, a flat list of ProjectTask objects in which a subtask names its
summary, and Links, the TaskLink dependencies between them. Give all
three the same lists and they agree, because they schedule the same objects with the same
arithmetic; a bar dragged on the Gantt chart moves the boxes here at once. Observable collections,
and the tasks and links in them, are watched while the chart is loaded.
What a box shows
| Row | Left, middle, right |
|---|---|
Top | The task's name; a diamond before it marks a milestone. |
Middle | Earliest start; length in working days ( |
Bottom | Latest start; total float ( |
A strip along the foot of the box fills with ProjectTask.Progress. With
ShowCriticalPath on, critical boxes and the arrows between them are outlined in
CriticalBrush, and so is a float below zero, which means the plan is already
late.
The network
The boxes are the work – the tasks with no subtasks. A summary is not a box, but a link into a
summary still leads to its subtasks that nothing else inside it waits for, and a link out of one
leaves from those that nothing else inside it follows. Boxes stand in columns by how long the chain
of links before them is, so every arrow runs forward, and arrows turn in the gaps between boxes,
never through one. NodeWidth, NodeHeight, ColumnGap and
RowGap size the layout; ZoomFactor scales it.
Moving about
The chart is one tab stop and shows the plan without changing it. Click a box to select it,
drag the background to pan, turn the wheel to scroll (with Shift, sideways) and hold Ctrl with the
wheel to zoom about the pointer. Right moves to the nearest task that follows, Left to the nearest
it follows, Up and Down along a column, Home and End to the first and last box; Enter raises
TaskActivated; Page Up and Page Down scroll; Ctrl+Plus and Ctrl+Minus zoom and Ctrl+0
returns to actual size. A tooltip, and a screen reader, say what a box means in words, including the
tasks it follows and leads to.
Appearance
The chart draws itself and has no template. Boxes take Control.Background unless
NodeBackgroundBrush 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 network reads from right to left, and
the arrow keys follow. ExportImage draws the whole network.
Examples
One plan in three views. The window's data context has Tasks and Links
collections; choosing a task in any view chooses it in the others, because each view's
SelectedTask is bound to the Gantt chart's.
<Window x:Class="Planner.PlanWindow"
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="Website relaunch" Width="1200" Height="800">
<TabControl>
<TabItem Header="Schedule">
<pm:GanttChart x:Name="gantt" Tasks="{Binding Tasks}" Links="{Binding Links}"
ProjectStart="2026-11-02" Zoom="Week" />
</TabItem>
<TabItem Header="Network">
<pm:PertChart Tasks="{Binding Tasks}" Links="{Binding Links}"
ProjectStart="2026-11-02"
NodeWidth="200" ColumnGap="72"
SelectedTask="{Binding SelectedTask, ElementName=gantt}"
TaskActivated="OnTaskActivated" />
</TabItem>
<TabItem Header="Board">
<pm:TaskBoard Tasks="{Binding Tasks}" Links="{Binding Links}"
ProjectStart="2026-11-02" LaneBy="Assignee"
SelectedTask="{Binding SelectedTask, ElementName=gantt}" />
</TabItem>
</TabControl>
</Window>A PERT chart made in code, never shown, to save the network as a picture for a report.
var pert = new PertChart
{
Tasks = plan.Tasks, // the application's ObservableCollection<ProjectTask>
Links = plan.Links,
ProjectStart = new DateTime(2026, 11, 2),
NodeWidth = 210,
};
ProjectSchedule schedule = pert.Schedule; // worked out from the plan as it is now
Console.WriteLine("Critical path: " + string.Join(" > ", schedule.CriticalPath));
BitmapSource image = pert.ExportImage(192);
var png = new PngBitmapEncoder();
png.Frames.Add(BitmapFrame.Create(image));
using (FileStream file = File.Create("Network.png"))
png.Save(file);See also
Members at a glance
| Constructors | |
|---|---|
PertChart | Creates an empty PERT chart, with empty Tasks, Links and
Holidays lists of its own and a Monday-to-Friday week. |
| Properties | |
ColumnGap | Gets or sets the space between one column of boxes and the next, where the arrows turn. |
CriticalBrush | Gets or sets the colour of the critical path, while ShowCriticalPath is on:
the outline of a critical box, the arrows between critical boxes, the word critical, and a
float below zero. |
Holidays | Gets or sets the dates that are not worked, beside the days WorkingWeek
leaves out. |
LinkBrush | Gets or sets the colour of the arrows that are not on the critical path. |
Links | Gets or sets the links between the tasks, which decide the order of the boxes and the arrows between them. |
NodeBackgroundBrush | Gets or sets the fill of every box. |
NodeBorderBrush | Gets or sets the outline of a box that is not critical, and – fainter – the lines that divide a box into its cells and the track behind its progress strip. |
NodeHeight | Gets or sets the height of every box. |
NodeWidth | Gets or sets the width of every box. |
ProgressBrush | Gets or sets the fill of the progress strip along the foot of a box, which fills from the
left with the task's ProjectTask.Progress. |
ProjectStart | Gets or sets the first day work on the plan can happen. |
RowGap | Gets or sets the space between one row of boxes and the next, along which an arrow that skips a column runs. |
Schedule | Gets the plan as scheduled: every task's early and late dates, its float, the critical path, and what in the input could not be used. |
SelectedTask | Gets or sets the selected task: the box with the highlighted ring, which the arrow keys move from. |
SelectionBrush | Gets or sets the colour of the ring round the selected box and of the arrows into and out of it, so its neighbours in the network can be traced. |
ShowCriticalPath | Gets or sets whether the critical boxes, and the arrows between them, are outlined in
CriticalBrush and marked critical. |
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 PERT chart 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. |
ZoomFactor | Gets or sets how large the network is drawn. |
| Methods | |
ArrangeOverride | Places the scroll bars, which appear only when the network is larger than the chart, and carries out a fit or a scroll asked for before the chart had a size. |
ExportImage | Draws the whole network as an image, at its own size and a zoom of 1, whatever part of it is in view and whatever is selected. |
GetEnumerator | Gets the two scroll bars, as logical children, so that they take the chart's resources and styles. |
GetVisualChild | Returns one of the two scroll bars. |
MeasureOverride | Asks for the network's size at the current ZoomFactor, or for the room
available when that is less. |
OnCreateAutomationPeer | Gives UI Automation the chart as a list of boxes, so that a screen reader can read and move through the network. |
OnDpiChanged | Draws the network again for a new display scale, so that its text is sharp on the new pixels. |
OnGotKeyboardFocus | Shows the focus cue and tells a screen reader which box is current. |
OnKeyDown | Carries out the chart's keys: the arrows, Home and End move between boxes, Enter activates the selected one, Page Up and Page Down scroll, and Ctrl with Plus, Minus or 0 zooms in, out, or back to actual size. |
OnLostKeyboardFocus | Takes the focus cue away when the chart loses the keyboard. |
OnLostMouseCapture | Ends a pan when something else takes the mouse, such as another window coming to the front. |
OnMouseLeave | Hides the tooltip when the pointer leaves the chart. |
OnMouseLeftButtonDown | Selects the box under the pointer, raising TaskActivated on a double-click,
or starts panning when the press is on the background. |
OnMouseLeftButtonUp | Ends a pan. |
OnMouseMove | Pans while the background is dragged; otherwise shows, after the hover time, a tooltip saying in words what the box under the pointer means. |
OnMouseWheel | Scrolls up and down, 48 logical units a notch; with Shift, scrolls sideways; with Ctrl, zooms about the pointer, by a factor of 1.2 a notch. |
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 box, which can be chosen, and a four-way arrow while panning. |
OnRender | Draws the chart: the network under the current scroll and zoom, then the selected box, its arrows and the focus cue over it. |
Reschedule | Schedules the plan again now and redraws. |
ScrollToTask | Scrolls the view, as little as it needs to, so that a task's box is in it with a margin round it. |
ZoomIn | Draws the network a fifth larger (ZoomFactor times 1.2, up to 3), keeping the
middle of the view where it is. |
ZoomOut | Draws the network smaller (ZoomFactor divided by 1.2, down to 0.25), keeping
the middle of the view where it is. |
ZoomToFit | Sets the ZoomFactor at which the whole network fits the chart, within 0.25 to
3, and scrolls to its start. |
| Events | |
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 box, the
application set the property, or the selected task left the plan. |
TaskActivated | Occurs when the reader asks to open a task: by double-clicking its box, or by pressing Enter on the selected box. |
ZoomFactorChanged | Occurs when ZoomFactor changes: set by the application, or by the reader with
Ctrl and the wheel, Ctrl+Plus, Ctrl+Minus or Ctrl+0. |
| Fields | |
ColumnGapProperty | Identifies the ColumnGap dependency property. |
CriticalBrushProperty | Identifies the CriticalBrush dependency property. |
HolidaysProperty | Identifies the Holidays dependency property. |
LinkBrushProperty | Identifies the LinkBrush dependency property. |
LinksProperty | Identifies the Links dependency property. |
NodeBackgroundBrushProperty | Identifies the NodeBackgroundBrush dependency property. |
NodeBorderBrushProperty | Identifies the NodeBorderBrush dependency property. |
NodeHeightProperty | Identifies the NodeHeight dependency property. |
NodeWidthProperty | Identifies the NodeWidth dependency property. |
ProgressBrushProperty | Identifies the ProgressBrush dependency property. |
ProjectStartProperty | Identifies the ProjectStart dependency property. |
RowGapProperty | Identifies the RowGap dependency property. |
SelectedTaskProperty | Identifies the SelectedTask dependency property. |
SelectionBrushProperty | Identifies the SelectionBrush dependency property. |
ShowCriticalPathProperty | Identifies the ShowCriticalPath dependency property. |
TasksProperty | Identifies the Tasks dependency property. |
TodayProperty | Identifies the Today dependency property. |
WorkingWeekProperty | Identifies the WorkingWeek dependency property. |
ZoomFactorProperty | Identifies the ZoomFactor dependency property. |
Constructors
PertChart
Creates an empty PERT chart, with empty Tasks, Links and
Holidays lists of its own and a Monday-to-Friday week.
Remarks
Each chart gets lists of its own, so adding a task to one chart never adds it to another. To share a plan, give several charts the same lists.
Properties
ColumnGap
Gets or sets the space between one column of boxes and the next, where the arrows turn.
- Value
- In logical units (1/96 inch). The default is 64; it is never drawn less than 24.
Remarks
Widen it when many arrows leave one column. A negative value, NaN or
an infinity is refused with an ArgumentException.
CriticalBrush
Gets or sets the colour of the critical path, while ShowCriticalPath is on:
the outline of a critical box, the arrows between critical boxes, the word critical, and a
float below zero.
- 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 chart's own; setting
nullgives a new empty one.
Remarks
An ObservableCollection is watched, so adding a date moves the dates in
the boxes at once. Give every view of a plan the same holidays, or their dates will
disagree.
LinkBrush
Gets or sets the colour of the arrows that are not on the critical path.
- Value
- The default is a grey,
#7B8794.nulluses the system's dark control colour.
Remarks
The arrows into and out of the selected box are drawn in SelectionBrush.
In Windows high contrast the system colours are used instead.
Links
Gets or sets the links between the tasks, which decide the order of the boxes and the arrows between them.
- Value
- The default is an empty list of the chart's own; setting
nullgives a new empty one.
Remarks
A link that cannot be honoured – an unknown task, a repeat, a loop – is left out and
reported in ProjectSchedule.Problems. The list is watched as Tasks is;
the chart never changes it.
NodeBackgroundBrush
Gets or sets the fill of every box.
- Value
- The default is
null: boxes take the chart'sBackground, or the system window colour when that is not set, so they follow a light or a dark theme.
Remarks
Text in a box is drawn in Foreground; choose a fill it reads on.
In Windows high contrast the system colours are used instead.
Example
<pm:PertChart Background="#F4F6F8" NodeBackgroundBrush="White" NodeBorderBrush="#B0BAC5"
CriticalBrush="#C62828" ProgressBrush="#2E7D32" />NodeBorderBrush
Gets or sets the outline of a box that is not critical, and – fainter – the lines that divide a box into its cells and the track behind its progress strip.
- Value
- The default is a mid grey,
#8A96A3, which reads on light and dark backgrounds alike.nulluses the system's dark control colour.
Remarks
In Windows high contrast the system colours are used instead.
NodeHeight
Gets or sets the height of every box.
- Value
- In logical units (1/96 inch) at a
ZoomFactorof 1. The default is 92. A box is never drawn shorter than 48, the least that holds its three rows of text.
Remarks
A negative value, NaN or an infinity is refused with an
ArgumentException.
NodeWidth
Gets or sets the width of every box.
- Value
- In logical units (1/96 inch) at a
ZoomFactorof 1. The default is 188. A box is never drawn narrower than 80, the least that holds three short dates side by side.
Remarks
A long task name is cut short with an ellipsis; widen the boxes to show more of it. A
negative value, NaN or an infinity is refused with an
ArgumentException.
See also
ProgressBrush
Gets or sets the fill of the progress strip along the foot of a box, which fills from the
left 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.
- 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.
Remarks
A date that is not worked is read as the next working day.
RowGap
Gets or sets the space between one row of boxes and the next, along which an arrow that skips a column runs.
- Value
- In logical units (1/96 inch). The default is 28; it is never drawn less than 8.
Remarks
A negative value, NaN or an infinity is refused with an
ArgumentException.
Schedule
Gets the plan as scheduled: every task's early and late dates, its 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 chart that is not loaded is not listening to its plan, so it schedules afresh each time this is read – which is what lets a chart that is never shown answer from the plan as it is now.
See also
SelectedTask
Gets or sets the selected task: the box with the highlighted ring, which the arrow keys move from.
- Value
- A task that is a box of this chart, or
nullfor none; the default. It binds two-way by default.
Remarks
Setting a summary, or a task not in Tasks, highlights no box, 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.
See also
SelectionBrush
Gets or sets the colour of the ring round the selected box and of the arrows into and out of it, so its neighbours in the network can be traced.
- 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 the critical boxes, and the arrows between them, are outlined in
CriticalBrush and marked critical.
- Value
- The default is
true.
Remarks
Turning it off changes only the drawing; the critical tasks are still in
ProjectSchedule.CriticalPath.
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 schedule and draw. The default is an empty list of the chart's own; setting
nullgives the chart a new empty list, so it is nevernull.
Remarks
Every task with no subtasks is a box; a summary is not. While the chart is loaded, an
ObservableCollection or a BindingList<T> is watched, and so is every
task in it. A plain List<T> is read when it is assigned; call Reschedule
after changing one.
See also
Today
Gets or sets the date the charts treat as today. A PERT chart 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 PERT chart and a TaskBoard alike, by one style or one
binding.
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.
Remarks
Durations and float are counted in these working days. In XAML: WorkingWeek="Monday,
Tuesday, Wednesday, Thursday".
ZoomFactor
Gets or sets how large the network is drawn.
- Value
- A scale, where 1 is the size
NodeWidthand the other metrics give. The default is 1. Values are kept between 0.25 and 3; zero, a negative value,NaNor an infinity is refused with anArgumentException. It binds two-way by default.
Remarks
A change keeps the middle of the view (or the point under the pointer, for Ctrl and the
wheel) where it is on screen, and raises ZoomFactorChanged.
Example
<Slider Minimum="0.25" Maximum="3" Value="{Binding ZoomFactor, ElementName=pert}" />
<pm:PertChart x:Name="pert" Tasks="{Binding Tasks}" Links="{Binding Links}" />See also
Methods
ArrangeOverride
Places the scroll bars, which appear only when the network is larger than the chart, and carries out a fit or a scroll asked for before the chart had a size.
Parameters
arrangeBounds- The size the chart has been given.
Returns
arrangeBounds: the chart uses all of it.
ExportImage
Draws the whole network as an image, at its own size and a zoom of 1, whatever part of it is in view and whatever is selected.
Parameters
dpi- The resolution in dots per inch; 96, the default, gives one pixel per logical unit, and 192 an image twice as sharp for print.
Returns
The image, frozen, so that it can be saved or handed to another thread.
Exceptions
ArgumentOutOfRangeExceptiondpiis not a positive number.
Remarks
The image uses the chart's colours, font and reading direction. The chart need not be on screen: one made only for exporting reads its plan afresh. An empty plan gives a small image that says "No tasks".
An image that would be wider or taller than 16,384 pixels, or larger than 128 megapixels, is
made at the highest resolution below dpi that fits; its
DpiX says which.
GetEnumerator
Gets the two scroll bars, as logical children, so that they take the chart'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 network's size at the current ZoomFactor, 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. An empty plan asks for 240 by 120, room for its "No tasks" message.
OnCreateAutomationPeer
Gives UI Automation the chart as a list of boxes, so that a screen reader can read and move through the network.
Returns
The chart's automation peer.
Remarks
Each box is a list item named with what it shows in words – its dates, length, float or
that it is critical, and the tasks it follows and leads to – and can be selected, scrolled into view
and invoked, which raises TaskActivated.
OnDpiChanged
Draws the network again for a new display scale, so that its text is sharp on the new pixels.
Parameters
oldDpi- The scale before.
newDpi- The scale now.
OnGotKeyboardFocus
Shows the focus cue and tells a screen reader which box is current.
Parameters
e- The event data.
OnKeyDown
Carries out the chart's keys: the arrows, Home and End move between boxes, Enter activates the selected one, Page Up and Page Down scroll, and Ctrl with Plus, Minus or 0 zooms in, out, or back to actual size.
Parameters
e- The key. Every arrow is marked handled, even at the edge of the network, so it never moves the focus out of the chart.
Remarks
Right goes to the nearest task that follows the selected one, Left to the nearest it
follows, Up and Down along its column. With FrameworkElement.FlowDirection right to
left, Left and Right swap. With nothing selected, the first key selects the first box, or for End
the last.
OnLostKeyboardFocus
Takes the focus cue away when the chart loses the keyboard.
Parameters
e- The event data.
OnLostMouseCapture
Ends a pan when something else takes the mouse, such as another window coming to the front.
Parameters
e- The event data.
OnMouseLeave
Hides the tooltip when the pointer leaves the chart.
Parameters
e- The event data.
OnMouseLeftButtonDown
Selects the box under the pointer, raising TaskActivated on a double-click,
or starts panning when the press is on the background.
Parameters
e- The press.
OnMouseLeftButtonUp
Ends a pan.
Parameters
e- The release.
OnMouseMove
Pans while the background is dragged; otherwise shows, after the hover time, a tooltip saying in words what the box under the pointer means.
Parameters
e- The move.
OnMouseWheel
Scrolls up and down, 48 logical units a notch; with Shift, scrolls sideways; with Ctrl, zooms about the pointer, by a factor of 1.2 a notch.
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 box, which can be chosen, and a four-way arrow while panning.
Parameters
e- The event data.
OnRender
Draws the chart: the network under the current scroll and zoom, then the selected box, its arrows and the focus cue over it.
Parameters
drawingContext- Where to draw.
Reschedule
Schedules the plan again now and redraws.
Remarks
Needed only after changing a plain List<T> or array, or a task in one;
observable collections and the objects in them are watched. Objects newly added to a plain list are
watched from here on. ScheduleChanged is raised before this returns.
ScrollToTask
Scrolls the view, as little as it needs to, so that a task's box is in it with a margin round it.
Parameters
task- The task to show. Nothing happens for
null, a summary, or a task that is not in the plan.
Remarks
The selection does not change. Called before the chart has a size, it waits for the first layout.
ZoomIn
Draws the network a fifth larger (ZoomFactor times 1.2, up to 3), keeping the
middle of the view where it is.
ZoomOut
Draws the network smaller (ZoomFactor divided by 1.2, down to 0.25), keeping
the middle of the view where it is.
ZoomToFit
Sets the ZoomFactor at which the whole network fits the chart, within 0.25 to
3, and scrolls to its start.
Remarks
An empty plan is left as it is. Called before the chart has a size – from a constructor, say – it waits for the first layout and then fits.
Events
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 are scheduled once and announced once, from the dispatcher, after
they have all arrived; so a handler sees the finished result. Reschedule raises it
before it returns. A chart that is not loaded does not raise it; nor does loading one, so read
Schedule when the chart is loaded if you need the first result.
See also
SelectedTaskChanged
Occurs when SelectedTask changes: the reader chose another box, the
application set the property, or the selected task left the plan.
See also
TaskActivated
Occurs when the reader asks to open a task: by double-clicking its box, or by pressing Enter on the selected box.
Remarks
The chart does nothing else with it; it is the place to open the task's details or switch
to it in a GanttChart. The box is already selected.
Example
pert.TaskActivated += (sender, e) =>
{
tabs.SelectedItem = scheduleTab; // show the Gantt chart...
gantt.SelectedTask = e.Task; // ...on the same task
gantt.ScrollToTask(e.Task);
};ZoomFactorChanged
Occurs when ZoomFactor changes: set by the application, or by the reader with
Ctrl and the wheel, Ctrl+Plus, Ctrl+Minus or Ctrl+0.
Example
pert.ZoomFactorChanged += (sender, e) => zoomText.Text = pert.ZoomFactor.ToString("P0");Fields
ColumnGapProperty static
Identifies the ColumnGap dependency property.
CriticalBrushProperty static
Identifies the CriticalBrush dependency property.
HolidaysProperty static
Identifies the Holidays dependency property.
LinkBrushProperty static
Identifies the LinkBrush dependency property.
LinksProperty static
Identifies the Links dependency property.
NodeBackgroundBrushProperty static
Identifies the NodeBackgroundBrush dependency property.
NodeBorderBrushProperty static
Identifies the NodeBorderBrush dependency property.
NodeHeightProperty static
Identifies the NodeHeight dependency property.
NodeWidthProperty static
Identifies the NodeWidth dependency property.
ProgressBrushProperty static
Identifies the ProgressBrush dependency property.
ProjectStartProperty static
Identifies the ProjectStart dependency property.
RowGapProperty static
Identifies the RowGap dependency property.
SelectedTaskProperty static
Identifies the SelectedTask dependency property.
SelectionBrushProperty static
Identifies the SelectionBrush dependency property.
ShowCriticalPathProperty static
Identifies the ShowCriticalPath dependency property.
TasksProperty static
Identifies the Tasks dependency property.
TodayProperty static
Identifies the Today dependency property.
WorkingWeekProperty static
Identifies the WorkingWeek dependency property.
ZoomFactorProperty static
Identifies the ZoomFactor dependency property.