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 31. WPF Control Templates and Us... > Building Custom UserControls with Bl...

31.6. Building Custom UserControls with Blend

During your examination of dependency properties, you were briefly introduced to the concept of a UserControl. In some ways, a UserControl is the next logical step after a control template. Recall that when you build a control template, you are essentially applying a skin which changes the physical appearance of a WPF control. A custom UserControl, however, allows you to literally build a new class type that may contain unique members (methods, events, properties, etc.). As well, many custom UserControls use templates and styles; however, it is also just fine if the control's tree of markup is defined directly within the <UserControl> scope.

Recall that you can add a UserControl project item to any Visual Studio 2010 WPF application, including creating a UserControl library project, which is a *.dll that contains nothing but a collection of UserControls to make use of across projects.


  

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