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

Creating custom controls

When using WPF, we can generally create the UI that we want using the many techniques already discussed in this book. However, in the cases when we require a totally unique control with both a custom drawn appearance and custom functionality, then we may need to declare a custom control.

Developing custom controls is very different to creating UserControl elements and it can take some time to master this. To start with, we will need to add a new project of type WPF Custom Control Library to declare them in. Also, instead of having a XAML page and a code behind file, we only have the code file. At this point, you may be wondering where we define what our control should look like.

In fact, when defining a custom control, we ...

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