Skip to Content
Mastering Windows Presentation Foundation
book

Mastering Windows Presentation Foundation

by Sheridan Yuen
February 2017
Intermediate to advanced
568 pages
14h 19m
English
Packt Publishing
Content preview from Mastering Windows Presentation Foundation

Combining controls

When we need to arrange a number of existing controls in a particular way, we typically use a UserControl object. This is why we normally use this type of control to build our Views. However, when we need to build a reusable control, such as an address control, we tend to separate these from our Views, by declaring them in a Controls folder and namespace within our Views project.

When declaring these reusable controls, it is customary to define Dependency Properties in the code behind and as long as there is no business-related functionality in the control, it is also ok to use the code behind to handle events. If the control is business-related, then we can use a View Model, as we do with normal Views. Let's take a look at an ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Windows Presentation Foundation - Second Edition

Mastering Windows Presentation Foundation - Second Edition

Sheridan Yuen

Publisher Resources

ISBN: 9781785883002Supplemental Content