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

Chapter 5. The Visual State Manager > Custom Visual State Managers

Custom Visual State Managers

Usually the built-in Visual State Manager will provide all the functionality you need. There are times when it is necessary either to track changes or to override the behavior and take control yourself. For those circumstances, you can create a custom VSM. Creating your own VSM is a two-step process.

The first step is to create a class and derive from the core Visual State Manager. Listing 5.4 is a sample implementation that simply passes functionality along to the base and prints out some additional debug information, such as the type and name of the root element that the VSM is attached to.


  

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
  • DownloadDownload
  • PrintPrint