Gets or sets the Assembly that provides the pack uniform resource identifiers (URIs) for resources in a WPF application.
Assembly: PresentationFramework (in PresentationFramework.dll)
A WPF application has an entry assembly, or has already been set.
By default, WPF resources are resolved at run time with respect to the entry assembly, which is identified by the value returned from the GetEntryAssembly method.
The entry assembly is the assembly that is returned by GetEntryAssembly and could be the following:
The executable assembly in the default application domain.
The first assembly to be executed by calling ExecuteAssembly.
In the following cases, however, a WPF assembly cannot get a reference to the entry assembly:
An unmanaged (native) application hosts the WPF assembly.
A managed application hosts the WPF assembly by loading it into a new application domain using a method other than ExecuteAssembly.
In both of these cases, GetEntryAssembly returns null, and the WPF assembly's resources cannot be resolved. In these cases, can be set, once only, with a reference to the assembly that should be used to resolve resources.
can only be set once because it is unlikely that the resource assembly will change after the WPF assembly is loaded.
cannot be set when a WPF assembly can discover the entry assembly—that is, when GetEntryAssembly returns a reference to an assembly rather than null.
This property is thread safe and is available from any thread.
is introduced in the .NET Framework version 3.5. For more information, see .NET Framework 3.5 Architecture.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.