Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Resources Follow the visual tree, so if you have a resource in your control then that is the resource that is used, if the resource is not present then it looks further up the tree for the resource, this means that if you define a application resource with the same criteria as your control resource it will be used as a default if your resource is not present Commented Feb 8, 2017 at 16:15
  • 1
    Those steps (add reference and add resource dictionary somehow) are must, if someone doesn't do them - it's his problem. You can add those into documentation (readme.txt) of library, but that's all what is needed. If you really need to give a hint, then you can create custom MarkupExtension used instead of DynamicResource, where you check for availability of resource at the moment when xaml is loaded/parsed, unfortunately I don't have time to quickly test this approach today. Commented Feb 8, 2017 at 16:19
  • Hi, thanks for your replies. I think I will solve it with some kind of documentation like Sinatr mentioned. I think about a file lets call it DefaultApp.xaml and I put all my Default DynamicResources in this. And I also publish it to the Buildpath so everyone can consume this file and see which Resources he/she needs. Commented Feb 9, 2017 at 9:52