I am building a WPF app with several assemblies, and I want to share a resource dictionary among them. That requires a ComponentResourceKey. I have built a small demo to tes
I found my problem. I was confusing the Component Resource Key with the Resource ID inside the resource dictionary. In other words, my Component Resource Key was the same as the Resource ID. I changed my static property to this:
public static ComponentResourceKey RedBrushKey
{
get {return new ComponentResourceKey(typeof(SharedResources), "RedSolidBrush"); }
}
The property name is now RedBrushKey, instead of RedSolidBrush. And the key is now working.