In this
article, we will learn how we can use merge a resource dictionary in WPF XAML.
As we all
know, that WPF applications supports rich media and graphics support, styles
and templates should be managed in such a way that they can be reused. Styles
can be defined in the same XAML file or all the styles and templates which are
reusable across different screens can be accumulated in a Resource Dictionary
File.
What is Resource Dictionary?
In Resource
Dictionary, one can write reusable styles, DataTemplates, ControlTemplates. One
can also define custom definitions for Brush, Color, Background etc.
Each of
these custom defined style or template is called as resource and a unique key
must be given to each resource.
Steps to add Resource Dictionary