Share via


PackageExtensionCatalog.Open(String) Method

Definition

Opens a catalog of extensions.

public:
 static PackageExtensionCatalog ^ Open(Platform::String ^ packageExtensionName);
 static PackageExtensionCatalog Open(winrt::hstring const& packageExtensionName);
public static PackageExtensionCatalog Open(string packageExtensionName);
function open(packageExtensionName)
Public Shared Function Open (packageExtensionName As String) As PackageExtensionCatalog

Parameters

packageExtensionName
String

Platform::String

winrt::hstring

The extension namespace name.

Returns

A catalog containing the extensions declared with the specified extension namespace name.

Remarks

Package extensions are scoped by the <uap17:PackageExtension Name=...> defined in the extension's Package.appxmanifest file. Only extensions that match the <uap17:PackageExtension Name=...> defined in the host's Package.appxmanifest file appear in the catalog.

If you have multiple <uap17:PackageExtensionHost> declarations in your host app, you need to open a separate catalog for each one.

An instance of the PackageCatalog is required to handle the events so keep a reference to it as long as you need to manage your app extensions.

Applies to

See also