private void server_DocumentLoaded(object sender, EventArgs e) { IUriProviderService service = server.GetService <IUriProviderService>(); if (service != null) { service.RegisterProvider(new CustomUriProvider()); } }