A collection of 40 lines with randomly generated widths (1-10 pixels) and lengths (25-400 pixels) are drawn to the window.
Event handlers are used to allow the lines to be:
- Generate a new list of 40 lines
- Sort by length ascending (via CompareTo)
- Sort by length descending (via System.Comparison compliant function)
- Sort by width ascending (via a lambda expression)
- Sort by width then by height (via System.Comparison compliant function)
- Removal of all lines shorter than 75 pixels (via System.Predicate with compliant predicate function)
- Removal of all lines greater than 325 pixels (via System.Predicate with lambda expression)
- Ability to highlight all lines within ten pixel long of the trackbar value (via lambda expressions with extension methods)