Prev | Current Page 44 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"

. . . . . . . . . . . . . . . . . . . . . . . 865
nCHAPTER 24 Custom Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
Understanding Custom Elements in WPF . . . . . . . . . . . . . . . . . . . . . . . . . . 868
Building a Basic User Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870
Defining Dependency Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
Defining Routed Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
Adding Markup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876
Using the Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
Command Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
A Closer Look at User Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882
Lookless Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
Refactoring the Color Picker Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
Refactoring the Color Picker Markup . . . . . . . . . . . . . . . . . . . . . . . . . 884
Streamlining the Control Template . . . . . . . . .


Pages:
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56