ComponentResourceKey as DynamicResource problem
问题 I'm seeing some unexpected behavior using ComponentResourceKey. The problem came up because I was using names used in the SystemColors class. Consider the following code: First I expose a ComponentResourceKey in a as a static property: public enum ColorKeys { ControlColor } public class MyColors { public static ComponentResourceKey ControlColorKey { get { return new ComponentResourceKey(typeof(MyColors), ColorKeys.ControlColor); } } } Using the key in markup to assign a resource to that key