Silverlight 2 Visual Essentials.pdf
(
3713 KB
)
Pobierz
107400998 UNPDF
Available as a
PDF Electronic Book
or
Print On Demand
Silverlight 2
232
PAgeS
Matthew MacDonald
Visual Essentials
About firstPress
Apress's
firstPress
series is your source for understanding cutting-edge technology. Short,
highly focused, and written by experts, Apress's firstPress books save you time and effort. They
contain the information you could get based on intensive research yourself or if you were to
attend a conference every other week—if only you had the time. They cover the concepts and
techniques that will keep
you
ahead of the technology curve. Apress's firstPress books are real
books, in your choice of electronic or print-on-demand format, with no rough edges even when
the technology itself is still rough. You can't afford to be without them.
Silverlight 2 Visual Essentials
Dear Reader,
This concise book explores what visual elements and visual programming functionality
Silverlight 2 has to offer. These visual elements are really the key to the appeal of Silverlight,
and so they are the focus of the book. Among the topics addressed are
A solid introduction to all aspects of Silverlight where you build a simple Silverlight project
Silverlight’s layout manager and Silverlight elements
The Silverlight event model
The application model
Shapes and geometries available to Silverlight developers
Brushes and transforms
A brief discussion of what you can do with animations in Silverlight
While there is some code, that is not the point of the book. Rather, it is to get you to quickly
understand what visual functionality is available and what programming options are available,
without getting bogged down in much code.
The text assumes that if you are a programmer, you have an understanding of XAML. However,
if you ignore the code, any decision maker who needs to get a better understanding of what
Silverlight can do, any layperson, or even an administrator can come to grips with the visual
elements of Silverlight.
Best Regards,
Matthew MacDonald
Contents
Chapter 1: Introducing Silverlight.................................................
1
Understanding Silverlight.......................................................................
2
Silverlight vs. Flash .......................................................................................
6
Silverlight 1.0 and 2.0 ...................................................................................
9
Silverlight and WPF ......................................................................................
9
Silverlight and Visual Studio................................................................
12
Understanding Silverlight Web Sites ..........................................................
12
Creating a Silverlight Project ......................................................................
14
The Anatomy of a Silverlight Application ..................................................
15
Creating a Simple Silverlight Page .............................................................
18
Adding Event Handling Code .....................................................................
20
Browsing the Silverlight Class Libraries ....................................................
23
Testing a Silverlight Application ................................................................
27
Creating an ASP.NET Web Site with Silverlight Content..........................
29
Silverlight Compilation and Deployment .............................................
34
Compiling a Silverlight Assembly ..............................................................
34
Deploying a Silverlight Assembly ..............................................................
36
The HTML Entry Page................................................................................
38
The Application Manifest............................................................................
46
The Last Word .......................................................................................
48
Chapter 2: Layout .....................................................................
49
The Layout Containers .........................................................................
49
The Panel Background ................................................................................
51
Silverlight 2 Visual Essentials
i
Borders ........................................................................................................
54
Simple Layout with the StackPanel......................................................
55
Layout Properties ........................................................................................
58
Alignment ....................................................................................................
60
Margin .........................................................................................................
61
Minimum, Maximum, and Explicit Sizes ...................................................
63
The Grid.................................................................................................
66
Fine-Tuning Rows and Columns.................................................................
70
Nesting Layout Containers..........................................................................
72
Spanning Rows and Columns .....................................................................
74
Using the GridSplitter .................................................................................
74
Coordinate-Based Layout with the Canvas..........................................
75
The Page ................................................................................................
78
Scrolling ......................................................................................................
80
Scaling .........................................................................................................
81
Full Screen...................................................................................................
81
Navigation .............................................................................................
82
Loading Child User Controls ......................................................................
83
Hiding Elements ..........................................................................................
83
The Last Word .......................................................................................
84
Chapter 3: Dependency Properties and Routed Events.................
85
Dependency Properties .........................................................................
86
Defining and Registering a Dependency Property ......................................
87
Dynamic Value Resolution .........................................................................
90
Attached Properties .....................................................................................
91
Routed Events........................................................................................
92
The Core Element Events............................................................................
92
Event Bubbling............................................................................................
95
ii
Silverlight 2 Visual Essentials
Mouse Movements ......................................................................................
96
Capturing the Mouse ...................................................................................
97
Mouse Cursors.............................................................................................
98
Key Presses..................................................................................................
99
Key Modifiers............................................................................................
100
Focus .........................................................................................................
101
The Last Word .....................................................................................
102
Chapter 4: Elements ...............................................................
103
The Silverlight Elements.....................................................................
103
Static Text ............................................................................................
106
Font Properties ..........................................................................................
108
Underlining................................................................................................
113
Runs...........................................................................................................
114
Wrapping Text...........................................................................................
115
Content Controls .................................................................................
117
The Content Property ................................................................................
119
Aligning Content .......................................................................................
122
Buttons.......................................................................................................
123
Tooltips......................................................................................................
129
List Controls ........................................................................................
134
Text Controls .......................................................................................
138
Text Selection............................................................................................
138
The WatermarkedTextBox ........................................................................
140
Range-Based Controls ........................................................................
141
Date Controls.......................................................................................
143
The Last Word .....................................................................................
148
Chapter 5: The Application Model.............................................
149
Silverlight 2 Visual Essentials
iii
Plik z chomika:
sliwak
Inne pliki z tego folderu:
pcmag 062008.pdf
(27427 KB)
index.html
(90 KB)
iPhone Open Application Development.chm
(735 KB)
iExec Enterprise Essentials Companion Guide.pdf
(2972 KB)
eBay QuickSteps.pdf
(22303 KB)
Inne foldery tego chomika:
2005_pl
2009_pl
2010_pl
Archiv
Audio (Dźwięk)
Zgłoś jeśli
naruszono regulamin