20. Resources
In the last chapter we explored some of the rich graphics capabilities that WPF provides. We only skimmed the surface, of course, but you should have a sense of what the basic graphic objects like gradients and brushes are capable of. With the exception of writing custom effects in HLSL, none of the graphics classes are difficult to use.
But what if you have a beautiful radial gradient with, say, eight or nine gradient stops, all custom colors, that you want to use for every button in your application? You wouldn’t want to define it in every <Button> tag; that would just be too tedious. Not to mention almost guaranteeing that the gradient would change at some point in the future, requiring you to change the code for every button ...
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.
Read now
Unlock full access