AppUriHandlerRegistrationManager.GetDefault AppUriHandlerRegistrationManager.GetDefault AppUriHandlerRegistrationManager.GetDefault AppUriHandlerRegistrationManager.GetDefault AppUriHandlerRegistrationManager.GetDefault Method

Definition

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

public : static AppUriHandlerRegistrationManager GetDefault()
static AppUriHandlerRegistrationManager GetDefault() const;
public static AppUriHandlerRegistrationManager GetDefault()
Public Shared Function GetDefault() As AppUriHandlerRegistrationManager
var appUriHandlerRegistrationManager = Windows.System.AppUriHandlerRegistrationManager.getDefault();

Returns

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.

See also