Creation of a UserControl: Task List
Jump to navigation
Jump to search
Introduction
There are three different styles in which 'Task Items' should be able to be displayed in openPETRA:
With 'Task Items' we mean the list of text items within a surrounding panel. The Task Items perform varying functionality when clicked - depending on the context in which the task items are to be shown. The performing of the functionality is outside of the scope of this implementation.
Outline of the Solution
Desired Outcome
- Creation of one UserControl which can present a list of 'Task Items' in the three different styles shown in the introduction.
- The different styles will need to affect
- the font
- the background colour (also needs support for gradient backgrounds [see 'Action Items in Task Panel' in the introduction])
- indentation of Task Items
- space between Task Items
- The different styles will need to affect
- The UserControl needs to accept the Task Items as a single XmlNode (which has XmlNode children which represent the actual Task Items).
- The UserControl needs to be able to 'grow' or 'shrink' itself in vertical direction - depending on the number of XmlNodes (also dynamically, as some Task Items might be hidden initially).
- Calling of a Delegate (.NET implementation of a Callback) on 'activation' of a Task Item.
- Implement optional numbering of Task Items ("1. xxx", "2. yyy").
- Implement Sub-task Items (only one level deep), which are found as children of the XmlNodes of the Task Items. Sub-task Items should be shown indented under their 'parent' Task Items and follow the numbering of their 'parent' Task Item, if optional numbering is switched on ("1.1 xzxz", "1.2 yzyz" under "1. xxx").
- Dividing lines between Task Items (see 'Action Items in Task Panel' in the introduction).
- Navigation between the Task Items and 'activating' of a Task needs to be possible by keyboard
- <CURSOR-UP> and <CURSOR-DOWN> keys for navigation
- <ENTER> or <SPACE> keys for 'activation' of selected item
- 'Highlighting' of currently selected Task Item. The style of the highlighting will be different between the three different display styles.
- Task Item text will need to be able to show an underlined character (designated by an ampersand & sign in the text) and the Task Item will need to be 'activated' if the user presses <ALT>+<{underlined character}>.
- Optional 'highlighting' of 'activated' (clicked or keyboard-selected) Task Item. The style of the highlighting will be different between the three different display styles and be different from the highlighting of the currently selected Task Item.
- Disabled Task Items will need to be shown 'greyed out' and the user must not be able to 'activate' them or navigate to them.
- Hidden Task Items must be possible. Those should not be shown, but it must be possible to show them programmatically at any time.
- Public Methods for Disabling/Enabling and Hiding/Showing of individual Task Items must be implemented.
- BONUS: Optional Icons in from of task items would be nice. The icon file name would somehow be specified in the XmlNode.