AppListEntry.AppUserModelId プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
この AppListEntry
のアプリケーション ユーザー モデル ID (AUMID) を取得します。
public:
property Platform::String ^ AppUserModelId { Platform::String ^ get(); };
winrt::hstring AppUserModelId();
public string AppUserModelId { get; }
var string = appListEntry.appUserModelId;
Public ReadOnly Property AppUserModelId As String
プロパティ値
アプリの ID を表す文字列。
Windows の要件
デバイス ファミリ |
Windows 10 Fall Creators Update (10.0.16299.0 で導入)
|
API contract |
Windows.Foundation.UniversalApiContract (v5.0 で導入)
|
例
// Find and activate the desired application (if present on this machine)
using namespace Windows.Management.Deployment;
async Task<bool> RunApplicationAsync(string aumid)
{
var packageManager = new Windows.Management.Deployment.PackageManager();
IEnumerable<Package> packages = packageManager.FindPackagesForUserWithPackageTypes(
null, PackageTypes.Main | PackageTypes.Optional);
foreach (Package package in packages)
{
IReadOnlyList<AppListEntry> entries = await package.GetAppListEntriesAsync();
foreach (AppListEntry entry in entries)
{
if (String.Equals(entry.AppUserModelId, aumid, StringComparison.OrdinalIgnoreCase))
{
return await entry.LaunchAsync();
}
}
}
return false;
}
注釈
AUMID は、アプリケーションを識別するために使用できる永続化可能な値です。 これは、 パッケージ ファミリ名 + Package Relative Application ID (PRAID) に基づいています。
識別子 | 説明 |
---|---|
パッケージ ファミリ名 | Name + Publisher (appxmanifest.xml<Identity> で見つかった要素)。 |
PRAID | Id appxmanifest.xml で見つかった の プロパティ Application (例: <Application Id="Foo"...> )。 |
AUMID はパッケージのバージョンまたはアーキテクチャに依存しないため、複数のバージョンまたはプラットフォーム間でアプリを識別するために使用できます。
適用対象
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示