public Form1()
        {
            InitializeComponent();

            blazorWebView1.ComponentType = typeof(RazorClassLibrarySample.SampleWebComponent);

            var hostBuilder = BlazorWebHost.CreateDefaultBuilder()
                              .ConfigureServices((hostContext, services) =>
            {
                // Adds web-specific services such as NavigationManager
                services.AddBlazorHybrid();

                // Register app-specific services
                services.AddSingleton <AppState>();
            })
                              .UseWebRoot("wwwroot");

            hostBuilder.UseStaticFiles();

            var host = hostBuilder.Build();

            _appState = host.Services.GetRequiredService <AppState>();

            blazorWebView1.Host = host;
        }
        public static IHostBuilder CreateDefaultBuilder(string[] args = null)
        {
            var builder = BlazorWebHost.CreateDefaultBuilder(args);

            EnableStyleSheetSupport();

            return(builder);
        }
        public static IHostBuilder CreateDefaultBuilder(string[] args = null)
        {
            var builder = BlazorWebHost.CreateDefaultBuilder(args);

            EnableStyleSheetSupport();

            builder.ConfigureServices(serviceCollection =>
            {
                serviceCollection.AddSingleton <MobileBlazorBindingsRenderer>();
            });

            return(builder);
        }