Creation of a UserControl: Task List

From OpenPetra Wiki
Revision as of 22:29, 14 December 2010 by Christiankatict (talk | contribs) (Created page with '==Introduction== There are three different styles in which 'Task Items' should be able to be displayed in openPETRA: [[File:Task_Panel_Sample_1a_-_Accordion_Panel_Demo.png|100px…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

There are three different styles in which 'Task Items' should be able to be displayed in openPETRA:

Menu Items in Accordion Panel
Action Items in Task Panel
Pages in Shepherd Navigation Panel

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 list Task Items in the three different styles, as shown in the introduction.
    • The different styles will need to affect
      • the font
      • the background colour
      • indentation of Task Items
      • space between Task Items
  • The UserControl needs to accept the Task Items as an array of XmlNodes.
  • 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.
  • Calling of a Delegate (.NET implementation of a Callback) on 'activation' of a Task Item.
  • BONUS: Optional Icons in from of task items would be nice. The icon file name would somehow be specified in the XmlNode.