MindFusion.Wpf Pack Programmer's Guide
Customizing the Appearance of Items

Items in the ActivityChart and ResourceChart controls can be customized through various properties exposed by the base BaseChart class. The ItemBackground, ItemBorderBrush, ItemMouseOverBackground and ItemMouseOverBorderBrush can be used to customize the background and border of the items in normal and hovered state respectively. The ItemAccentBrush and ItemFocusBrush properties can be used to specify the appearance of specific item parts, such as the end and start brackets and the focus frame. Various item-related cursors can be specified through the ItemLeftResizeCursor, ItemRightResizeCursor and ItemProgressResizeCursor properties.

Activities and allocations can be customized individually by handling the ActivityPresenterCreated and AllocationPresenterCreated events of the ActivityChart and ResourceChart classes respectively. The event argument provides a reference to the ActivityPresenter or AllocationPresenter object, which is used to present the item. The presenter provides properties similar to the one specified above - BackgroundBorderBrush, AccentBrushFocusBrush, MouseOverBackground, MouseOverBorderBrush, CornerRadius, and so on. In addition, the ActivityPresenter exposes several properties which can be used to customize the appearance of the resource names - ResourcesLabelFontStyle, ResourcesLabelFontWeightResourcesLabelFontSize, ResourcesLabelFontStretch, ResourcesLabelForeground, ResourcesLabelOffsetX and ResourcesLabelOffsetY.