Prev | Current Page 195 | Next

Gurdy Leete and Mary Leete

"Microsoft Expression Blend Bible"

The Event palette includes
over 70 events to which you can assign an event handler, including DragOver,
MouseRightButtonDown, MouseLeftButtonDown, MouseEnter, MouseLeave, KeyDown, and
KeyUp. Some of these events may be related to objects, such as MouseEnter, and others may not
be, such as KeyDown and KeyUp. For more about using the code-behind file, see the section later
in this chapter, ???Adding code to the code-behind files.???
When you add controls, layout panels or other objects to the artboard, Blend automatically generates
the XAML code for those objects and instantly adds it into the XAML code file. Blend also adds
the XAML code for animations, media files, and data binding. Normally there may be no need to
delve into the XAML code, although it??™s important to understand the basics. And some results can??™t
be achieved in your application without modifying the XAML code files or the code-behind files.
The code-behind files can do almost anything in your application, because C# and Visual Basic offer
so many more capabilities than XAML. But for anything that deals with the visual design of the application,
you want to use XAML whenever possible. By using XAML code rather than C# or Visual
Basic, you can view your application in Blend??™s Design mode, without having to build your project
CROSS-REF CROSS-REF
92
Designing Next-Generation User Experiences Part I
and run it outside of Blend to view your design after you make each change in your code.


Pages:
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207