Chapter 4. Creating User and Custom Controls
WPF provides developers with unparalleled options in customizing and modifying the visual appearance of controls.
In the first instance, you can simply assign custom values to the appearance properties of the built-in WPF controls. For example, you could set the Background
property of a System.Windows.Controls.Button
control to silver and the FontWeight
property to bold.
If you wanted to reuse this Button
control in different places within your application, you could define an application-wide System.Windows.Style
to set these property values and then apply this Style
to all Button
objects automatically (see Chapter 6).
Alternatively, suppose you wanted every Button
to display an image surrounded by a ...
Get WPF Recipes in C# 2008: A Problem-Solution Approach now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.