Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
[TypeConverterAttribute(typeof(ComponentResourceKeyConverter))] public class ComponentResourceKey : ResourceKey
/** @attribute TypeConverterAttribute(System.Windows.Markup.ComponentResourceKeyConverter) */ public class ComponentResourceKey extends ResourceKey
TypeConverterAttribute(System.Windows.Markup.ComponentResourceKeyConverter) public class ComponentResourceKey extends ResourceKey
This class implements an object type that is useful for creating keys that are based on types in assemblies plus an identifier. Because you define or reference the type, you do not need to request a specific ResourceDictionary, and more than one set of resources can exist in the assembly, each differentiated by the type of their ComponentResourceKey.
There are two ways to define a ComponentResourceKey.
If you want an easily accessible key, you can define a static property on your control class code that returns a ComponentResourceKey, constructed with a TypeInTargetAssembly that exists in the external resource assembly, and a ResourceId. The key can be used for defining alternate default styles for controls in an assembly, by swapping the original external resource assembly for a custom one. You can also define a named resource part within a larger control style or template to expose a customization entry point. This is particularly useful if you are defining a theme resource dictionary for your control.
You can also use the XAML ComponentResourceKey Markup Extension in verbose syntax directly to create a loose instance of the key. This is useful if you want to declare private resources from other assemblies that are less discoverable to customize.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.