Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

2.4. Interacting with Shapes

It is always important to remember that any shape you render on the artboard using Expression Blend is a true object and can be interacted with in code. For example, shapes (rectangles, paths, ellipses, lines, callouts, etc.) support a number of events that you can handle in your programs to interact with the geometries in various ways.

The first step in interacting with shapes from code is to give them a name, using the Name field on the Properties panel. If you are following along, try the following. Select each shape in turn using the Selection tool, and then name each shape via the Properties panel. The exact name you give each item is unimportant, but you should pick useful monikers such as myCallout, myStar, and so on. Figure 2-24 shows the name (fancyShape) of one of my geometries.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint