Using Merged Resource Dictionaries in Silverlight 3 to split resources into separate files
Merged Resource Dictionaries provide a way to define and split resources into separate files. By locating application resources in external file we can then reuse them between applications. This feature can be helpful in custom control development, but not only.
In Silverlight 2 resources cannot be factored into separate files and that leads to large App.xaml file holding application-wide shared resources.
Merged Resources Dictionaries are a great solution for these problems – you are free to split style definitions and other resources into manageable pieces, making it easy to localize and revise.
You can include your resource .xaml file in the project as Resource or as Content or as an external assembly.
You can refer it like the external xaml like this:
And use it like this: {StaticResource TitleBrush}
No comments yet.
