Creation of a UserControl: Task List: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
(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…')
 
Line 16: Line 16:


==Desired Outcome==
==Desired Outcome==
* Creation of ''one'' UserControl which can list Task Items in the ''three different styles'', as shown in the introduction.  
* 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 different styles will need to affect  
*** the font
*** the font
*** the background colour
*** the background colour (also needs support for gradient backgrounds [see 'Action Items in Task Panel' in the introduction])
*** indentation of Task Items
*** indentation of Task Items
*** space between Task Items
*** space between Task Items
* The UserControl needs to accept the Task Items as an array of XmlNodes.
* 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 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").
* 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").
Line 32: Line 34:
* 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}>.
* 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.
* 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.
* 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.
* BONUS: Optional Icons in from of task items would be nice. The icon file name would somehow be specified in the XmlNode.

Revision as of 05:43, 15 December 2010

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 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 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.