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
Share this Page URL
Help

20. Resources > Property Triggers

Property Triggers

image

Basic styles have a lot of benefits: They help ensure visual consistency, they make it easier to hand off the graphics to a different team, and they reduce repetitive code. But they have one drawback: There’s only one style per customer. A lot of elements, like the Button, actually have multiple appearances, depending on various conditions like whether they’re selected or the user has moused over them. The solution to that is the Triggers collection that’s exposed by the Style object.

There are three kinds of triggers. PROPERTY TRIGGERS, which we’ll examine in this section, are applied when a property has a specified value. EVENT TRIGGERS, which we’ll examine in the next section, apply their values when an event occurs, Finally, DATA TRIGGERS are like property triggers, but they’re based on a bound value. We’ll examine those in Chapter 22.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free 10-Day Trial


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