Advanced Desktop Programming
Benjamin Perkins, Jacob Vibe Hammer, Jon D. Reid · 2018
One of the best features of Windows Presentation Foundations (WPF) is the complete control and provides designers over the look and feel of user interfaces. Central to this is the capability to style controls however the users want, in two or three dimensions. This chapter describes two basic techniques: Styles: sets of properties that are applied to a control as a batch; and templates: the controls that are used to build the display for a control. WPF can style any control and use templates to change existing controls to look nothing like they do out-of-the-box. User controls are used to create code and extensible application markup language (XAML) that can be reused easily in the own project. The chapter explores how to create the user controls when the common controls are not enough. It further discusses the following topics: routed commands; Menu control; value converters; and animations.