LauncherOptions.PreferredApplicationPackageFamilyName Property
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.
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:
property Platform::String ^ PreferredApplicationPackageFamilyName { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring PreferredApplicationPackageFamilyName();
void PreferredApplicationPackageFamilyName(winrt::hstring value);
public string PreferredApplicationPackageFamilyName { get; set; }
var string = launcherOptions.preferredApplicationPackageFamilyName;
launcherOptions.preferredApplicationPackageFamilyName = string;
Public Property PreferredApplicationPackageFamilyName As String
Property Value
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.