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, orhas 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.
GetEntryAssembly returns a reference to an assembly rather than null.cannot be set when a WPF assembly can discover the entry assembly—that is, when
This property is thread safe and is available from any thread.
Available since 3.0