The ListView is described in Chapter 18.
CHAPTER 7 n CLASSIC CONTROLS 196
??? RepeatButton, which fires Click events continuously, as long as the button is held
down. Ordinary buttons fire one Click event per user click.
??? ToggleButton, which represents a button that has two states (pushed or unpushed).
When you click a ToggleButton, it stays in its pushed state until you click it again to
release it. This is sometimes described as ???sticky click??? behavior.
Both RepeatButton and ToggleButton are defined in the System.Windows.Controls.Primitives
namespace, which indicates they aren??™t often used on their own. Instead, they??™re used to
build more complex controls by composition, or extended with features through inheritance.
For example, the RepeatButton is used to build the higher-level ScrollBar control (which,
ultimately, is a part of the even higher-level ScrollViewer). The RepeatButton gives the arrow
buttons at the ends of the scroll bar their trademark behavior??”scrolling continues as long as
you hold it down. Similarly, the ToggleButton is used to derive the more useful CheckBox and
RadioButton classes described next.
However, neither the RepeatButton nor the ToggleButton is an abstract class, so you can
use both of them directly in your user interfaces. The ToggleButton is genuinely useful inside
a ToolBar, which you??™ll use in Chapter 18.
Pages:
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384