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 > Task List

Task List

image

In this chapter we’ll explore the basic elements of WPF resources.

Defining Resources

image

Our first step, of course, is to figure out how resources are declared and how to use them once they are. There are several options, which probably comes as no surprise at this point. We’ll examine the most common ones.

Styles

image

While simply declaring an object as a resource so that it can be reused is really useful, it’s even better when you can combine a set of property declarations that will apply to all (or some) of the objects in your application.

Property Triggers

image

Trigger elements are defined as part of a Style. They make it possible to change property values or even perform simple actions when something happens in the application. There are two kinds of triggers and we’ll start by exploring the simplest type: property triggers that are invoked (“triggered”) when the value of a property changes.


  

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