Jaa


AppUriHandlerRegistrationManager.GetDefault Method

Definition

Creates an AppUriHandlerRegistrationManager for the calling app for the current user.

public:
 static AppUriHandlerRegistrationManager ^ GetDefault();
 static AppUriHandlerRegistrationManager GetDefault();
public static AppUriHandlerRegistrationManager GetDefault();
function getDefault()
Public Shared Function GetDefault () As AppUriHandlerRegistrationManager

Returns

An AppUriHandlerRegistrationManager which can be used to access AppUriHandlerRegistrations.

Examples

string uriHandlerName = "Runtime"; 
Windows.System.AppUriHandlerRegistrationManager manager = AppUriHandlerRegistrationManager.GetDefault(); // Or GetForUser() for multi user-aware apps. 
AppUriHandlerRegistration registration = manager.TryGetRegistration(uriHandlerName);
if (registration != null)
{
    // App can get or set hosts as needed
}

Remarks

Apps which support multiple users should instead use AppUriHandlerRegistrationManager.GetForUser.

Applies to

See also