LauncherOptions.PreferredApplicationPackageFamilyName LauncherOptions.PreferredApplicationPackageFamilyName LauncherOptions.PreferredApplicationPackageFamilyName LauncherOptions.PreferredApplicationPackageFamilyName LauncherOptions.PreferredApplicationPackageFamilyName Property

Definition

Gets or sets a value that represents the package family name of the app in the Store that the user should install if no app exists to handle the file type or URI.

public : Platform::String PreferredApplicationPackageFamilyName { get; set; }
winrt::hstring PreferredApplicationPackageFamilyName();

void PreferredApplicationPackageFamilyName(winrt::hstring preferredapplicationpackagefamilyname);
public string PreferredApplicationPackageFamilyName { get; set; }
Public ReadWrite Property PreferredApplicationPackageFamilyName As string
var string = launcherOptions.preferredApplicationPackageFamilyName;
launcherOptions.preferredApplicationPackageFamilyName = string;

Property Value

string string string

The package family name of the app.

Examples

See the code example in the LauncherOptions.PreferredApplicationDisplayName topic.

Remarks

In some cases the user may not have an app installed to handle the file that you are launching. By default, Windows will handle these cases by providing the user with a link to search for an appropriate app on the store. Use LauncherOptions.PreferredApplicationDisplayName in conjunction with LauncherOptions.preferredApplicationPackageFamilyName to provide the user with an app in the Microsoft Store that they can acquire to handle the file. The display name that you use should correspond to the display name of the app in the Microsoft Store.

You must set both of these preferred application properties to recommend an app. Setting one without the other will result in a failure.

Note

You cannot set the preferred application properties and the fallback URI at the same time, since only one fallback may be used. The Launcher API will fail if both fallbacks are set.

Important

This property is only implemented on Desktop devices.

See also