AppExtensionCatalog.Open(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Opens a catalog of extensions.
public:
static AppExtensionCatalog ^ Open(Platform::String ^ appExtensionName);
static AppExtensionCatalog Open(winrt::hstring const& appExtensionName);
public static AppExtensionCatalog Open(string appExtensionName);
function open(appExtensionName)
Public Shared Function Open (appExtensionName As String) As AppExtensionCatalog
Parameters
- appExtensionName
-
String
Platform::String
winrt::hstring
The extension namespace name.
Returns
A catalog containing the extensions declared with the specified extension namespace name.
Remarks
For a packaged app to see/enumerate appextensions it must meet at least one of the following criteria:
- Run as MediumIL (or higher)
- Run in an AppContainer and declare a matching appextensionhost
- Run in an AppContainer and have the packageQuery capability
This check is called by AppExtensionCatalog.Open and [AppExtensionCatalog::RequestRemovePackageAsync](/uwp/api/windows.applicationmodel.appextensions.
If you have multiple <uap3:AppExtensionHost>
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.
App Extension | Purpose |
---|---|
com.microsoft.windows.dontmaximizeonsmallscreen | Prevents app from maximizing on launch on small devices. Currently used by the Calculator app. |