');-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 0;-webkit-mask-size:.5em 1em;-webkit-clip-path:inset(0 0 calc(1em - .5em) 0)padding-box;clip-path:inset(0 0 calc(1em - .5em) 0)padding-box;background-color:currentColor!important;margin-left:.125rem;padding:0 .25em;opacity:.84}code{font-family:fira code,monospace;color:#212121}code{font-size:85%;background-color:#f8f8f8;border-radius:6px;padding:.2em .4em;margin:0}.btn{display:inline-block;background-color:#055deb;color:#fff;font-size:16px;line-height:1.5;font-weight:700;text-align:center;text-decoration:none;padding:14px 24px;border-radius:28px;vertical-align:middle;border:2px solid transparent;will-change:background-color,color}@media screen and (max-width:640px){.btn{padding:14px 16px}}.btn.product-bg{background-color:var(--product-color)}.btn-bordered{background-color:transparent;border-color:#055deb;color:#055deb}.btn-white-bordered{background-color:transparent;border-color:#fff;color:#fff}.icon-button{position:relative;width:48px;height:48px;border-radius:50%}.icon-button .icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:24px;color:#055deb}.arrow-link{display:inline-flex;align-items:center;text-decoration:none;font-size:16px;font-weight:700;line-height:1.2;margin:0;padding:0}.arrow-link span{color:inherit;border-bottom:1px solid transparent}.arrow-link svg{width:20px;height:20px}.arrow-link.prev span{margin-left:4px;padding-top:2px;order:2}#cookie-notice{display:none;position:fixed;background-color:rgba(35,37,38,.97);left:0;right:0;bottom:-200px;box-shadow:0 -1px 14px rgba(0,0,0,6%),0 -1px 2px rgba(0,0,0,4%),0 -5px 15px rgba(0,0,0,4%);transform:translateZ(0);animation:slideUpCookieNotice .6s 1s ease-in forwards;z-index:100}#cookie-notice .cookie-content{position:relative;display:flex;align-items:center;justify-content:center;padding-top:12px;padding-bottom:12px}#cookie-notice .cookie-text{color:rgba(255,255,255,.7);font-size:14px}#cookie-notice .cookie-text a{text-decoration:none;color:rgba(255,255,255,.7);border-bottom:1px solid rgba(255,255,255,.54)}@media screen and (max-width:576px){#cookie-notice .cookie-text{padding-right:146px}}#cookie-notice .agree-btn{margin:0 0 0 24px;padding:12px 24px}@media screen and (max-width:576px){#cookie-notice .agree-btn{position:absolute;display:flex;align-items:center;justify-content:center;top:0;right:0;bottom:0;padding:12px 16px;border-radius:0}}@keyframes slideUpCookieNotice{100%{bottom:0}}input,textarea{font-family:pragmatica,Helvetica,Arial,sans-serif;font-size:16px;padding:12px 16px;border-radius:3px;border:1px solid #c6c6c6;margin-bottom:28px}input::-moz-placeholder,textarea::-moz-placeholder{color:#8f95a3}input::-moz-placeholder,textarea::-moz-placeholder{color:#8f95a3}input~.error-message{visibility:hidden;color:#ff4a4a;font-size:13px;line-height:16px;margin-top:-24px;margin-bottom:8px}@media screen and (max-width:640px){input~.error-message{display:none}}input:not(:focus):not(:placeholder-shown):valid{border-color:#c6c6c6}textarea{overflow:auto;overflow-wrap:break-word;resize:none}select{display:none}form{display:flex;flex-direction:column;text-align:left}form label{display:block;font-size:14px;color:#212121;font-weight:700;margin-bottom:4px}form .form-actions{margin-top:32px}form .form-actions .submit-holder .btn{width:100%}.loading-screen{display:none}.loading-screen .loading-screen-container{display:flex;flex-direction:column;justify-content:center;align-items:center;position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.95);z-index:1001;text-align:center}.loading-screen .sending .text{margin-top:12px;margin-left:10px}.loading-screen .error{display:none;max-width:640px;margin:0 auto}.loading-screen .error .title{font-size:30px;font-weight:300;padding-top:32px;margin-bottom:16px}.loading-screen .error .btn-back .arrow-link{margin-top:40px;margin-left:-24px}.expandable-section .expandable-section-link .link-show-more [class*=text-]{border-bottom:2px solid transparent}.expandable-section .expandable-section-link .link-show-more .text-hide{display:none}.animated-arrow-icon.to-left{transform:scaleX(-1)}.animated-arrow-icon .arrow-container{transform:translateX(-4px)}.animated-arrow-icon .arrow-line{stroke-dasharray:13px;stroke-dashoffset:13px}body,html{height:100%;margin:0;padding:0;color:#212121;font-family:pragmatica,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}html{scroll-padding-top:64px}.wrapper{min-height:100%;display:flex;flex-direction:column;align-items:stretch}.main{flex-grow:1}.content-holder{position:relative;max-width:1260px;margin-right:auto;margin-left:auto;padding-right:40px;padding-left:40px}@media screen and (max-width:768px){.content-holder{padding-right:32px;padding-left:32px}}@media screen and (max-width:480px){.content-holder{padding-right:20px;padding-left:20px}}.section-content{padding-top:80px;padding-bottom:80px}@media screen and (max-width:768px){.section-content{padding-top:56px;padding-bottom:56px}}.page-content{padding-top:calc(var(--navbar-height) + 40px);padding-bottom:80px}@media screen and (max-width:768px){.page-content{padding-top:calc(var(--navbar-height) + 24px);padding-bottom:56px}}#navbar{position:absolute;width:100%;height:var(--navbar-height);z-index:1000;background-color:var(--navbar-color)}#navbar .content-holder{height:100%}#navbar .nav-container{display:flex;height:100%;align-items:center}.navigation{height:100%}@media screen and (max-width:876px){.navigation{display:none}}.navigation .nav-list{display:flex;height:100%;list-style:none}#navbar{--navbar-item-bg:rgba(255, 255, 255, .12);--navbar-item-underline:rgba(255, 255, 255, .75)}.nav-item{display:flex;align-items:center;padding:0 22px;border-radius:0 0 8px 8px;-webkit-transform:translateZ(0)}@media screen and (max-width:1200px){.nav-item{padding:0 14px}}@media screen and (max-width:1024px){.nav-item{padding:0 10px}}.nav-item:last-child.button{padding:0 0 0 10px}.nav-item:last-child.link{padding:0 0 0 22px}.nav-item.opens-subnav{border-radius:0}.nav-item .nav-link{text-decoration:none;font-size:15px;color:var(--navbar-link-color);font-weight:700;line-height:20px;opacity:.75}@media screen and (min-width:961px){.nav-item .nav-link{font-size:16px}}.nav-item .nav-link span{padding-bottom:1px;border-bottom:1px solid transparent}.nav-item .nav-link.with-caret-icon:after{content:'';display:inline-block;vertical-align:middle;margin:-3px 0 0 6px;border-bottom:2px solid #fff;border-right:2px solid #fff;width:6px;height:6px;transform:rotate(45deg);transform-origin:66% 66%}.nav-item .nav-link.with-caret-icon span{border-style:dotted}.nav-item .nav-link.external-link{display:flex}.nav-item .nav-link.external-link span{margin-bottom:-2px}.nav-item .nav-link.dotted-underline span{border-style:dotted}.nav-item .nav-button{padding:10px 20px;line-height:1.2}@media screen and (max-width:1024px){.nav-item .nav-button{padding:8px 12px}}@media screen and (max-width:991px){.nav-item .nav-button{font-size:14px;padding:8px}}@media screen and (min-width:1101px){.nav-item .short-name{display:none}}@media screen and (max-width:1100px){.nav-item .short-name+span{display:none}}.mobile-subnav .subsection-holder .subsection-title,.subnav-topbar .title-holder .title{color:rgba(0,0,0,.38);font-size:20px;font-weight:300}.subnav{visibility:hidden;opacity:0;background-color:#fff;will-change:opacity}@media screen and (max-width:876px){.subnav{width:100%;overflow-x:hidden}}.subnav .desktop-subnav,.subnav .mobile-subnav{display:none;height:100%}@media screen and (min-width:877px){.subnav .desktop-subnav{display:block}}.subnav .desktop-subnav .subsection{display:none}@media screen and (max-width:876px){.subnav .mobile-subnav{display:block}}.subnav .content-holder{overflow:auto}@media screen and (min-width:877px){.subnav .content-holder{padding-top:32px}}.subnav .navigation{display:block;padding-bottom:32px;height:auto}@media screen and (min-width:877px){.subnav .navigation{border-bottom:1px dotted rgba(0,0,0,.16);margin-bottom:32px}}.subnav .navigation .nav-list .nav-item{padding:0 32px 0 0}.subnav .navigation .nav-list .nav-item .nav-link{font-size:16px;font-weight:400;color:#212121;opacity:1}.subnav .navigation .nav-list .nav-item .nav-link.with-caret-icon:after{display:none}.mobile-subnav .subnav-body{display:flex;width:200%;height:calc(var(--app-window-height) - var(--navbar-height) - 72px);will-change:transform}.mobile-subnav .nav-holder,.mobile-subnav .subsection-holder{width:100%}.mobile-subnav .subsection-holder{will-change:transform}.mobile-subnav .subsection-holder .subsection{display:none}.mobile-subnav .subsection-holder .subsection-title{margin:16px 0 12px}.mobile-subnav .navigation{padding:0 0 12px}.mobile-subnav .navigation .nav-list{flex-direction:column}.mobile-subnav .navigation .nav-list .nav-item{padding:0;margin:0 -16px}.mobile-subnav .navigation .nav-list .nav-item .nav-link{width:100%;padding:20px 16px;border-radius:3px}.mobile-subnav .navigation .nav-list .nav-item .nav-button{color:#055deb;border:1px solid;margin:8px 16px;padding:12px 32px;min-width:220px}@media screen and (max-width:480px){.mobile-subnav .navigation .nav-list .nav-item .nav-button{width:100%}}.subnav-topbar{position:relative;padding:12px 0}@media screen and (min-width:877px){.subnav-topbar{display:none}}.subnav-topbar .subnav-underline{position:absolute;left:0;bottom:0;width:100%;height:1px;background:linear-gradient(90deg,rgba(0,0,0,.12),rgba(0,0,0,.12) 50%,transparent 0,transparent);background-size:6px 1px}.subnav-topbar .topbar-holder{display:flex;align-items:center;justify-content:space-between}.subnav-topbar .title-holder{display:flex;align-items:center}.subnav-topbar .title-holder .arrow-link{display:none}.subnav-topbar .close-btn{margin-right:-6px}.subnav-topbar .close-btn .icon-button .icon{color:rgba(0,0,0,.26)}@media screen and (max-width:876px){.subnav-content{margin-top:16px}}@media screen and (min-width:877px){.subnav-content.services .category-products{flex-direction:row}.subnav-content.services .category-products .product-item:not(:first-child){margin-left:24px}}.subnav-content .section .heading{color:#055deb;font-size:24px;font-weight:300;padding-top:0;margin-bottom:24px}@media screen and (min-width:877px){.subnav-content .section .heading{display:none}}@media screen and (max-width:876px){.subnav-content .section .heading{color:#8f95a3;font-size:20px}}.subnav-content .section .heading+.category{margin-top:-16px}.subnav-content ul{list-style:none}.subnav-content .categories{display:flex;flex-direction:row;-moz-column-gap:32px;column-gap:32px}@media screen and (max-width:876px){.subnav-content .categories{flex-direction:column}}.subnav-content .category{padding:0 40px 40px 0}@media screen and (max-width:876px){.subnav-content .category{padding-bottom:24px;padding-right:0}}.subnav-content .category .subheading{color:#8f95a3;font-size:14px;margin-bottom:10px}@media screen and (min-width:877px){.subnav-content .category .subheading{font-size:16px}}.subnav-content .category-products{display:flex;flex-direction:column}.product-item:not(:last-child){margin-bottom:6px}@media screen and (min-width:877px){.product-item{margin-left:-16px}}@media screen and (max-width:876px){.product-item{margin-right:0}}.product-item .product-link{display:flex;flex-direction:row;align-items:center;padding:16px;border-radius:8px;min-width:100px;text-decoration:none}@media screen and (min-width:877px){.product-item .product-link{max-width:400px}}@media screen and (max-width:876px){.product-item .product-link{padding:14px 16px;margin-left:-16px;margin-right:-16px}}.product-item .product-link.with-description{align-items:flex-start}.product-item .product-link.active{background-color:rgba(200,221,255,.2)}.product-item .product-link.active span{color:#055deb;font-weight:700}@media screen and (min-width:877px){.product-item .product-link.active{background-color:var(--product-color)}.product-item .product-link.active span{color:#fff}.product-item .product-link.active .description{color:#fff}.product-item .product-link.active svg:not(.outline-logo) path{fill:#fff}}.product-item .product-link .external-link{display:flex}.product-item .product-link svg{flex-shrink:0;margin-right:12px;width:44px;height:44px}@media screen and (max-width:876px){.product-item .product-link svg{margin:0 16px 0 0;width:32px;height:32px}}.product-item .product-link span{font-size:15px;color:#212121}@media screen and (max-width:876px){.product-item .product-link span{font-size:16px}}.product-item .product-link .description{font-size:14px;color:#6a707f;margin-top:4px}#navbar{--logo-underline:white;--product-teamdev-logo:white;--menu-icon:white;--menu-icon-border:rgba(255, 255, 255, .54)}.logo .logo-nav-link .icon-menu{font-size:24px;color:var(--menu-icon)}.logo .logo-nav-link .icon-menu:before{display:flex;align-items:center;justify-content:center;height:40px;width:40px}.logo{height:100%;margin-right:auto}.logo .logo-nav-link{display:flex;align-items:center;text-decoration:none;height:100%;padding:0 20px;margin-left:-20px;will-change:width}@media screen and (max-width:876px){.logo .logo-nav-link{display:flex;align-items:center;height:100%}}.logo .logo-nav-link .teamdev-logo{height:30px}@media screen and (max-width:876px){.logo .logo-nav-link .teamdev-logo{height:24px}}@media screen and (min-width:877px){.logo .logo-nav-link .icon-menu{display:none}}.logo .logo-nav-link.product-logo{position:relative}.logo .logo-nav-link.product-logo .teamdev-logo{position:absolute;top:0;width:100px;transform-origin:left;transform:scale(.45)translateY(0)translateZ(0);will-change:transform}.logo .logo-nav-link.product-logo .teamdev-logo svg path{fill:var(--product-teamdev-logo)}.logo .logo-nav-link.product-logo .icon-menu{border:1px solid var(--menu-icon-border);margin:-1px}.logo .logo-nav-link.product-logo .product-sign{flex-shrink:0;display:inline-block;width:40px;height:40px;vertical-align:middle}.logo .logo-nav-link.product-logo .product-sign svg path{fill:#fff}.logo .logo-nav-link.product-logo .product-name{text-decoration:none;font-size:30px;font-weight:300;color:var(--navbar-logo-text-color);line-height:1;margin:3px 0 0 8px;vertical-align:middle;border-bottom:1px dotted transparent}@media screen and (max-width:1080px){.logo .logo-nav-link.product-logo .product-name{font-size:26px;margin-top:1px}}@media screen and (max-width:960px){.logo .logo-nav-link.product-logo .product-name{font-size:20px}}@media screen and (max-width:876px){.logo .logo-nav-link.product-logo .icon-menu,.logo .logo-nav-link.product-logo .teamdev-logo{display:none}}@media screen and (max-width:480px){.logo .logo-nav-link.product-logo{width:126px}.logo .logo-nav-link.product-logo .icon-menu{display:block;border-color:transparent}.logo .logo-nav-link.product-logo .product-sign{margin-left:6px}.logo .logo-nav-link.product-logo .product-name{display:none}}#navbar{--lang-select-arrow-color:rgba(255, 255, 255, .64);--lang-select-bg-color:rgba(255, 255, 255, .12)}.language-select-holder{position:relative;margin:0 -10px 0 20px}@media screen and (max-width:1024px){.language-select-holder{margin-left:8px}}@media screen and (max-width:768px){.language-select-holder{margin-left:auto}}@media screen and (min-width:877px){.mobile-arrow-nav-item{display:none}}.mobile-arrow-nav-item .nav-link{display:flex;align-items:center;flex-direction:row;justify-content:space-between;padding:22px 0;color:#212121;border-top:1px dotted rgba(0,0,0,.16)}.mobile-arrow-nav-item .icon{font-size:24px;color:rgba(0,0,0,.26);margin-right:6px}:root{--snackbar-bottom-position:20px}.common-tab-content{display:none;opacity:0}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:1003;animation:animateTop .2s}.modal .modal-content{display:flex;flex-direction:column;background-color:#fff;border-radius:10px;box-shadow:0 2px 16px rgba(0,0,0,.38);max-width:600px;max-height:calc(100vh - 2 * 40px);margin:40px auto;color:#212121}@media screen and (max-width:640px){.modal .modal-content{margin:40px 16px}}.modal .modal-header{flex-shrink:0;display:flex;justify-content:space-between;padding:16px 32px}.modal .modal-header .modal-title{color:#212121;font-size:24px;font-weight:300;line-height:1.2;padding-top:8px;margin-bottom:0}.modal .modal-body{display:flex;flex-direction:column;flex-grow:1;overflow:auto;padding:0 32px 16px}.modal .modal-footer{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;padding:16px 32px}@keyframes animateTop{0%{top:-300px;opacity:0}100%{top:0;opacity:1}}.code-editor{position:relative;display:block;font-family:fira code,monospace;font-size:13px;background-color:#fff;font-weight:400;border-radius:4px;padding:0 0 0 30px;margin-bottom:20px;box-shadow:0 1px 3px rgba(200,221,255,.6),0 4px 25px #c8ddff}@media screen and (max-width:640px){.code-editor{padding-left:15px}}@media screen and (max-width:576px){.code-editor{white-space:normal;word-wrap:break-word}}.code-editor .hide{display:none!important}.code-editor .scroll{overflow:auto;max-height:680px;padding-left:5px;margin-left:-5px}@media screen and (max-width:640px){.code-editor .scroll{padding-left:10px;margin-left:-10px}}.code-editor:before{position:absolute;content:'';top:0;left:0;background:#f0f0f0;border-right:1px solid #d0d0d0;width:30px;height:100%;border-radius:4px 0 0 4px;z-index:2}@media screen and (max-width:640px){.code-editor:before{width:15px}}.code-editor .comments{color:gray;font-weight:500;font-style:italic;white-space:nowrap}.code-editor .keyword{color:navy;font-weight:500}.code-editor .link,.code-editor .string{color:#397f00;font-weight:500;background-color:transparent}.code-editor.visual-studio .comments{color:green;font-weight:400;font-style:normal}.code-editor.visual-studio .keyword{color:#00f}.code-editor.visual-studio .link{color:#00f;font-weight:400}.code-editor.visual-studio .name{color:#2b91af}.code-editor.xml-code .comments{color:green;font-weight:400;font-style:normal}.code-editor.xml-code .tag{color:#3b00fa}.code-editor.xml-code .tagname{color:#860907}.code-editor.xml-code .attribute{color:#ff1e1a}.code-editor.xml-code .string{color:#3b00f9}.ul-tree{position:relative;padding-left:0;margin:0}@media screen and (max-width:576px){.ul-tree{background-color:#fff}}.ul-tree ul{position:relative;margin:0;padding-left:0}.ul-tree ul:last-child{margin-bottom:0}.ul-tree .fourth-level,.ul-tree .second-level,.ul-tree .third-level{padding-left:12px}.ul-tree .bordered-level{border-left:1px solid #e6e6e6}.ul-tree .active>.shortening{display:none}.ul-tree .active>.filling{background-color:transparent}.ul-tree .active>.left-brace,.ul-tree .active>.right-brace{margin:0}.ul-tree .filling{background-color:#ecfaeb}.ul-tree .no-shift{padding:0}.ul-tree .no-shift li{padding:0}.ul-tree .right-brace{margin-left:-8px;padding-right:1px}.ul-tree li{position:relative;list-style:none outside none;margin:0;padding-left:14px;line-height:20px;white-space:nowrap}@media screen and (max-width:640px){.ul-tree li{line-height:18px}}.ul-tree>li{padding-left:8px}@media screen and (max-width:640px){.ul-tree>li{line-height:18px}}.ul-tree .empty-line{line-height:19px}@media screen and (max-width:640px){.ul-tree .empty-line{line-height:18px}}.ul-tree.ul-tree-drop .drop{position:absolute;width:11px;height:11px;top:6px;left:-5px;background:url(/images/icons/code-collapse-controls.png)no-repeat;z-index:2}.ul-tree.ul-tree-drop .second-level .drop{top:5px;left:-25px}.ul-tree.ul-tree-drop .second-level .drop-bottom{left:-25px;bottom:6px}.ul-tree.ul-tree-drop .third-level .drop{left:-52px}.ul-tree.ul-tree-drop .third-level .drop-bottom{left:-52px}.ul-tree.ul-tree-drop .drop-bottom{position:absolute;display:inline-block;width:11px;height:11px;bottom:5px;left:-5px;background:url(/images/icons/code-collapse-controls.png)-22px 0 no-repeat;z-index:2}.ul-tree.ul-tree-drop .active>.drop{background-position:-11px 0}#redirect-suggestion .modal-content{max-width:500px}#redirect-suggestion .modal-footer{gap:16px;justify-content:flex-end}@media screen and (max-width:480px){#redirect-suggestion .modal-footer{flex-direction:column;margin-bottom:16px}}#redirect-suggestion .modal-footer .btn{padding:8px 20px}#redirect-suggestion .modal-footer .btn-no{min-width:96px}.additional-field{height:0;font-size:0;line-height:0;padding:0;margin:0;border:none;overflow:hidden}.thank-you-section{display:none}.thank-you-section .thank-you-holder{max-width:460px;margin:0 auto;text-align:center}.thank-you-section .icon{font-size:64px;color:#055deb}.thank-you-section .title{font-size:30px;font-weight:700;padding-top:8px;margin-bottom:8px}.code-tabs{--code-tabs-indicator-line-color:var(--product-color);margin:20px 0 32px}.code-tabs .tabs{position:relative;display:flex}.code-tabs .tabs .tab{display:inline-block;padding:14px 16px;font-family:pragmatica,Helvetica,Arial,sans-serif;color:#8f95a3;font-weight:700;font-size:12px;line-height:1}.code-tabs .code-tab-content p{padding-top:0!important;margin-bottom:8px}.code-tab-content{display:none}.code-tab-content p:first-child{padding-top:0!important}:root{--hero-overlay-color:black}.dotnetbrowser .hero.product{background-image:url(/images/product-visuals/dotnetbrowser.webp)}@media screen and (max-width:768px){.dotnetbrowser .hero.product{background-image:url(/images/product-visuals/dotnetbrowser-mobile.webp)}}.hero.product{position:relative;background-position:50% 60%;background-repeat:no-repeat;background-size:cover}.hero.product:before{content:'';position:absolute;background:linear-gradient(to right,var(--hero-overlay-color) 20%,transparent 100%)no-repeat;background-size:cover;opacity:.8;width:100%;height:100%;top:0;left:0;right:0;bottom:0}@media screen and (max-width:768px){.hero.product:before{background:#000;opacity:.65}}.hero.product .page-content{color:#fff;padding-bottom:48px}.hero.product .page-content .title{font-size:30px;color:#fff;font-weight:700;margin-bottom:24px;line-height:1.3}@media screen and (max-width:960px){.hero.product .page-content .title br{content:""}.hero.product .page-content .title br:after{content:" "}}@media screen and (max-width:480px){.hero.product .page-content .title{font-size:24px}}.hero.product .page-content .mobile-product-name{font-size:40px;font-weight:300;color:#fff}@media screen and (min-width:481px){.hero.product .page-content .mobile-product-name{display:none}}.hero.product .page-content .requirements{text-shadow:0 1px 2px rgba(0,0,0,.6);margin-bottom:40px}.hero.product .page-content .requirements.no-bottom-margin{margin-bottom:0}@media screen and (max-width:480px){.hero.product .page-content .hero-btn{width:100%}}.hero.product .page-content .release-info{display:flex;flex-wrap:wrap;margin-top:40px;list-style:none;text-shadow:0 1px 2px rgba(0,0,0,.6);letter-spacing:.2px}@media screen and (max-width:640px){.hero.product .page-content .release-info{flex-direction:column}}.hero.product .page-content .release-info li{margin-right:24px;margin-top:8px}.hero.product .page-content .release-info .icon{display:inline-block;font-size:20px;vertical-align:middle;margin-top:-3px}.hero.product .page-content a:not(.btn){color:#fff;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.5)}.why-product .row{display:grid;grid-template-columns:repeat(3,1fr);gap:32px 80px}@media screen and (max-width:768px){.why-product .row{grid-template-columns:1fr}}.why-product .row .why-item{position:relative}.why-product .row .why-item .icon{font-size:32px;color:#055deb}@media screen and (max-width:768px){.why-product .row .why-item .icon{position:absolute}}.why-product .row .why-item .info-block{padding-top:10px}@media screen and (max-width:768px){.why-product .row .why-item .info-block{padding-top:6px;padding-left:56px}}.why-product .row .why-item .title{font-size:18px;padding-top:0;margin-bottom:8px}@media screen and (min-width:1025px){.jxbrowser .features.bento-layout .feature-list .feature-card:first-child{grid-area:a}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(2){grid-area:b}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(3){grid-area:c}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(4){grid-area:d}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(5){grid-area:e}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(6){grid-area:f}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(7){grid-area:g}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(8){grid-area:h}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(9){grid-area:i}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(10){grid-area:j}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(11){grid-area:k}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(12){grid-area:l}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(13){grid-area:m}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(14){grid-area:n}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(15){grid-area:o}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(16){grid-area:p}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(17){grid-area:q}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(18){grid-area:r}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(19){grid-area:s}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(20){grid-area:t}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(21){grid-area:u}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(22){grid-area:v}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(23){grid-area:w}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(24){grid-area:x}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(25){grid-area:y}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(26){grid-area:z}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(27){grid-area:aa}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(28){grid-area:bb}}@media screen and (min-width:1025px){.dotnetbrowser .features.bento-layout .feature-list .feature-card:first-child{grid-area:a}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(2){grid-area:b}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(3){grid-area:c}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(4){grid-area:d}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(5){grid-area:e}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(6){grid-area:f}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(7){grid-area:g}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(8){grid-area:h}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(9){grid-area:i}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(10){grid-area:j}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(11){grid-area:k}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(12){grid-area:l}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(13){grid-area:m}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(14){grid-area:n}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(15){grid-area:o}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(16){grid-area:p}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(17){grid-area:q}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(18){grid-area:r}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(19){grid-area:s}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(20){grid-area:t}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(21){grid-area:u}}.features .feature-list .feature-backdrop{position:fixed;background-color:#000;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transform:translate3d(0,0,0);top:0;right:0;bottom:0;left:0;opacity:0;z-index:1002}.getting-help .support-plans .body .btn{display:inline-flex;justify-content:center;width:100%}@media screen and (max-width:768px){.getting-help .support-plans .body .btn{font-size:14px;padding:12px 10px}}.pricing .price-options .option-actions .btn{width:100%}.support-pricing .action .btn{width:100%}.simple-integration .common-tab-content .content-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:32px}@media screen and (max-width:860px){.simple-integration .common-tab-content .content-row{display:block;max-width:620px;margin:0 auto}.simple-integration .common-tab-content .content-row .col{margin-bottom:32px}}.simple-integration .common-tab-content .guide-button{display:flex;flex-direction:column;align-items:center;margin:40px 0 24px}.simple-integration .code-container .title{font-size:24px;font-weight:300;padding:0;margin-bottom:16px}.simple-integration .code-container .subtitle{font-size:14px;color:#6a707f;margin:-16px 0 16px}.simple-integration .code-column>.code-container{margin-bottom:40px}.simple-integration .code-tabs .tabs{margin-bottom:20px}.simple-integration .code-tabs .code-container .subtitle{margin-top:-8px}.simple-integration .demo{position:relative;padding-top:56px}@media screen and (min-width:1201px){.simple-integration .demo{margin:0 32px}}.simple-integration .demo .demo-image{position:relative;border-radius:4px;overflow:hidden;margin:16px auto 0;box-shadow:0 1px 3px rgba(200,221,255,.6),0 4px 25px #c8ddff}.simple-integration .demo .demo-image:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1}.simple-integration .demo .demo-image .app-window{position:relative;display:block;width:100%;height:auto}.dotnetbrowser .simple-integration .demo{padding-top:52px}@media screen and (max-width:860px){.dotnetbrowser .simple-integration .demo{padding-top:0}}.modal.contact-modal .modal-body{padding-bottom:32px}.modal form .form-actions{margin-top:0}.modal .thank-you-section .section-content{padding-top:20px}@font-face{font-family:fira code;src:url(/fonts/fira-code/woff2/FiraCode-Regular.woff2)format("woff2"),url(/fonts/fira-code/woff/FiraCode-Regular.woff)format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:fira code;src:url(/fonts/fira-code/woff2/FiraCode-Medium.woff2)format("woff2"),url(/fonts/fira-code/woff/FiraCode-Medium.woff)format("woff");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:fira code;src:url(/fonts/fira-code/woff2/FiraCode-SemiBold.woff2)format("woff2"),url(/fonts/fira-code/woff/FiraCode-SemiBold.woff)format("woff");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:fira code;src:url(/fonts/fira-code/woff2/FiraCode-Bold.woff2)format("woff2"),url(/fonts/fira-code/woff/FiraCode-Bold.woff)format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:teamdev;src:url(/fonts/teamdev-icon-font/teamdev.eot);src:url(/fonts/teamdev-icon-font/teamdev.eot)format("embedded-opentype"),url(/fonts/teamdev-icon-font/teamdev.ttf)format("truetype"),url(/fonts/teamdev-icon-font/teamdev.woff)format("woff"),url(/fonts/teamdev-icon-font/teamdev.svg)format("svg");font-weight:400;font-style:normal;font-display:block}[class*=" icon-"],[class^=icon-]{font-family:teamdev!important;speak:never;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-close:before{content:"\e902"}.icon-menu:before{content:"\e90b"}.icon-proven-expertise:before{content:"\e920"}.icon-prompt-support:before{content:"\e921"}.icon-clear-api:before{content:"\e922"}.icon-email-check-thin:before{content:"\e950"}.icon-email-key-thin:before{content:"\e951"}.icon-nuget:before{content:"\e952"}.icon-caret-right:before{content:"\e96f"}:root{--product-color:#055deb;--product-color-rgb:5,93,235;--navbar-color:var(--product-color);--navbar-logo-text-color:#fff;--navbar-link-color:#fff;--link-color:#055deb}.dotnetbrowser{--product-color:#8f479b;--product-color-rgb:143,71,155;--navbar-color:var(--product-color)}:root{--navbar-height:100px;--app-window-height:100%}@media(max-width:768px){:root{--navbar-height:80px}}a,body,div,form,h1,h2,h3,html,iframe,label,li,p,span,strong,ul{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}img{max-width:100%;height:auto}*,::after,::before{box-sizing:border-box}a{text-decoration:none;color:var(--link-color)}p{font-size:16px;line-height:1.5}strong{font-weight:700}h1{font-size:74px;color:#212121;line-height:1.2;font-weight:900;padding-top:16px;margin-bottom:32px}@media screen and (max-width:640px){h1{font-size:48px}}h2{font-size:48px;font-weight:700;line-height:1.2;margin-bottom:24px}@media screen and (max-width:640px){h2{font-size:36px;line-height:1.1}}h3{font-size:30px;font-weight:700;padding-top:32px;margin-bottom:16px}.external-link{word-wrap:break-word}.external-link:after{content:'';-webkit-mask-image:url('data:image/svg+xml, ');-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 0;-webkit-mask-size:.5em 1em;-webkit-clip-path:inset(0 0 calc(1em - .5em) 0)padding-box;clip-path:inset(0 0 calc(1em - .5em) 0)padding-box;background-color:currentColor!important;margin-left:.125rem;padding:0 .25em;opacity:.84}code{font-family:fira code,monospace;color:#212121}code{font-size:85%;background-color:#f8f8f8;border-radius:6px;padding:.2em .4em;margin:0}.btn{display:inline-block;background-color:#055deb;color:#fff;font-size:16px;line-height:1.5;font-weight:700;text-align:center;text-decoration:none;padding:14px 24px;border-radius:28px;vertical-align:middle;border:2px solid transparent;will-change:background-color,color}@media screen and (max-width:640px){.btn{padding:14px 16px}}.btn.product-bg{background-color:var(--product-color)}.btn-bordered{background-color:transparent;border-color:#055deb;color:#055deb}.btn-white-bordered{background-color:transparent;border-color:#fff;color:#fff}.icon-button{position:relative;width:48px;height:48px;border-radius:50%}.icon-button .icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:24px;color:#055deb}.arrow-link{display:inline-flex;align-items:center;text-decoration:none;font-size:16px;font-weight:700;line-height:1.2;margin:0;padding:0}.arrow-link span{color:inherit;border-bottom:1px solid transparent}.arrow-link svg{width:20px;height:20px}.arrow-link.prev span{margin-left:4px;padding-top:2px;order:2}#cookie-notice{display:none;position:fixed;background-color:rgba(35,37,38,.97);left:0;right:0;bottom:-200px;box-shadow:0 -1px 14px rgba(0,0,0,6%),0 -1px 2px rgba(0,0,0,4%),0 -5px 15px rgba(0,0,0,4%);transform:translateZ(0);animation:slideUpCookieNotice .6s 1s ease-in forwards;z-index:100}#cookie-notice .cookie-content{position:relative;display:flex;align-items:center;justify-content:center;padding-top:12px;padding-bottom:12px}#cookie-notice .cookie-text{color:rgba(255,255,255,.7);font-size:14px}#cookie-notice .cookie-text a{text-decoration:none;color:rgba(255,255,255,.7);border-bottom:1px solid rgba(255,255,255,.54)}@media screen and (max-width:576px){#cookie-notice .cookie-text{padding-right:146px}}#cookie-notice .agree-btn{margin:0 0 0 24px;padding:12px 24px}@media screen and (max-width:576px){#cookie-notice .agree-btn{position:absolute;display:flex;align-items:center;justify-content:center;top:0;right:0;bottom:0;padding:12px 16px;border-radius:0}}@keyframes slideUpCookieNotice{100%{bottom:0}}input,textarea{font-family:pragmatica,Helvetica,Arial,sans-serif;font-size:16px;padding:12px 16px;border-radius:3px;border:1px solid #c6c6c6;margin-bottom:28px}input::-moz-placeholder,textarea::-moz-placeholder{color:#8f95a3}input::-moz-placeholder,textarea::-moz-placeholder{color:#8f95a3}input~.error-message{visibility:hidden;color:#ff4a4a;font-size:13px;line-height:16px;margin-top:-24px;margin-bottom:8px}@media screen and (max-width:640px){input~.error-message{display:none}}input:not(:focus):not(:placeholder-shown):valid{border-color:#c6c6c6}textarea{overflow:auto;overflow-wrap:break-word;resize:none}select{display:none}form{display:flex;flex-direction:column;text-align:left}form label{display:block;font-size:14px;color:#212121;font-weight:700;margin-bottom:4px}form .form-actions{margin-top:32px}form .form-actions .submit-holder .btn{width:100%}.loading-screen{display:none}.loading-screen .loading-screen-container{display:flex;flex-direction:column;justify-content:center;align-items:center;position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.95);z-index:1001;text-align:center}.loading-screen .sending .text{margin-top:12px;margin-left:10px}.loading-screen .error{display:none;max-width:640px;margin:0 auto}.loading-screen .error .title{font-size:30px;font-weight:300;padding-top:32px;margin-bottom:16px}.loading-screen .error .btn-back .arrow-link{margin-top:40px;margin-left:-24px}.expandable-section .expandable-section-link .link-show-more [class*=text-]{border-bottom:2px solid transparent}.expandable-section .expandable-section-link .link-show-more .text-hide{display:none}.animated-arrow-icon.to-left{transform:scaleX(-1)}.animated-arrow-icon .arrow-container{transform:translateX(-4px)}.animated-arrow-icon .arrow-line{stroke-dasharray:13px;stroke-dashoffset:13px}body,html{height:100%;margin:0;padding:0;color:#212121;font-family:pragmatica,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}html{scroll-padding-top:64px}.wrapper{min-height:100%;display:flex;flex-direction:column;align-items:stretch}.main{flex-grow:1}.content-holder{position:relative;max-width:1260px;margin-right:auto;margin-left:auto;padding-right:40px;padding-left:40px}@media screen and (max-width:768px){.content-holder{padding-right:32px;padding-left:32px}}@media screen and (max-width:480px){.content-holder{padding-right:20px;padding-left:20px}}.section-content{padding-top:80px;padding-bottom:80px}@media screen and (max-width:768px){.section-content{padding-top:56px;padding-bottom:56px}}.page-content{padding-top:calc(var(--navbar-height) + 40px);padding-bottom:80px}@media screen and (max-width:768px){.page-content{padding-top:calc(var(--navbar-height) + 24px);padding-bottom:56px}}#navbar{position:absolute;width:100%;height:var(--navbar-height);z-index:1000;background-color:var(--navbar-color)}#navbar .content-holder{height:100%}#navbar .nav-container{display:flex;height:100%;align-items:center}.navigation{height:100%}@media screen and (max-width:876px){.navigation{display:none}}.navigation .nav-list{display:flex;height:100%;list-style:none}#navbar{--navbar-item-bg:rgba(255, 255, 255, .12);--navbar-item-underline:rgba(255, 255, 255, .75)}.nav-item{display:flex;align-items:center;padding:0 22px;border-radius:0 0 8px 8px;-webkit-transform:translateZ(0)}@media screen and (max-width:1200px){.nav-item{padding:0 14px}}@media screen and (max-width:1024px){.nav-item{padding:0 10px}}.nav-item:last-child.button{padding:0 0 0 10px}.nav-item:last-child.link{padding:0 0 0 22px}.nav-item.opens-subnav{border-radius:0}.nav-item .nav-link{text-decoration:none;font-size:15px;color:var(--navbar-link-color);font-weight:700;line-height:20px;opacity:.75}@media screen and (min-width:961px){.nav-item .nav-link{font-size:16px}}.nav-item .nav-link span{padding-bottom:1px;border-bottom:1px solid transparent}.nav-item .nav-link.with-caret-icon:after{content:'';display:inline-block;vertical-align:middle;margin:-3px 0 0 6px;border-bottom:2px solid #fff;border-right:2px solid #fff;width:6px;height:6px;transform:rotate(45deg);transform-origin:66% 66%}.nav-item .nav-link.with-caret-icon span{border-style:dotted}.nav-item .nav-link.external-link{display:flex}.nav-item .nav-link.external-link span{margin-bottom:-2px}.nav-item .nav-link.dotted-underline span{border-style:dotted}.nav-item .nav-button{padding:10px 20px;line-height:1.2}@media screen and (max-width:1024px){.nav-item .nav-button{padding:8px 12px}}@media screen and (max-width:991px){.nav-item .nav-button{font-size:14px;padding:8px}}@media screen and (min-width:1101px){.nav-item .short-name{display:none}}@media screen and (max-width:1100px){.nav-item .short-name+span{display:none}}.mobile-subnav .subsection-holder .subsection-title,.subnav-topbar .title-holder .title{color:rgba(0,0,0,.38);font-size:20px;font-weight:300}.subnav{visibility:hidden;opacity:0;background-color:#fff;will-change:opacity}@media screen and (max-width:876px){.subnav{width:100%;overflow-x:hidden}}.subnav .desktop-subnav,.subnav .mobile-subnav{display:none;height:100%}@media screen and (min-width:877px){.subnav .desktop-subnav{display:block}}.subnav .desktop-subnav .subsection{display:none}@media screen and (max-width:876px){.subnav .mobile-subnav{display:block}}.subnav .content-holder{overflow:auto}@media screen and (min-width:877px){.subnav .content-holder{padding-top:32px}}.subnav .navigation{display:block;padding-bottom:32px;height:auto}@media screen and (min-width:877px){.subnav .navigation{border-bottom:1px dotted rgba(0,0,0,.16);margin-bottom:32px}}.subnav .navigation .nav-list .nav-item{padding:0 32px 0 0}.subnav .navigation .nav-list .nav-item .nav-link{font-size:16px;font-weight:400;color:#212121;opacity:1}.subnav .navigation .nav-list .nav-item .nav-link.with-caret-icon:after{display:none}.mobile-subnav .subnav-body{display:flex;width:200%;height:calc(var(--app-window-height) - var(--navbar-height) - 72px);will-change:transform}.mobile-subnav .nav-holder,.mobile-subnav .subsection-holder{width:100%}.mobile-subnav .subsection-holder{will-change:transform}.mobile-subnav .subsection-holder .subsection{display:none}.mobile-subnav .subsection-holder .subsection-title{margin:16px 0 12px}.mobile-subnav .navigation{padding:0 0 12px}.mobile-subnav .navigation .nav-list{flex-direction:column}.mobile-subnav .navigation .nav-list .nav-item{padding:0;margin:0 -16px}.mobile-subnav .navigation .nav-list .nav-item .nav-link{width:100%;padding:20px 16px;border-radius:3px}.mobile-subnav .navigation .nav-list .nav-item .nav-button{color:#055deb;border:1px solid;margin:8px 16px;padding:12px 32px;min-width:220px}@media screen and (max-width:480px){.mobile-subnav .navigation .nav-list .nav-item .nav-button{width:100%}}.subnav-topbar{position:relative;padding:12px 0}@media screen and (min-width:877px){.subnav-topbar{display:none}}.subnav-topbar .subnav-underline{position:absolute;left:0;bottom:0;width:100%;height:1px;background:linear-gradient(90deg,rgba(0,0,0,.12),rgba(0,0,0,.12) 50%,transparent 0,transparent);background-size:6px 1px}.subnav-topbar .topbar-holder{display:flex;align-items:center;justify-content:space-between}.subnav-topbar .title-holder{display:flex;align-items:center}.subnav-topbar .title-holder .arrow-link{display:none}.subnav-topbar .close-btn{margin-right:-6px}.subnav-topbar .close-btn .icon-button .icon{color:rgba(0,0,0,.26)}@media screen and (max-width:876px){.subnav-content{margin-top:16px}}@media screen and (min-width:877px){.subnav-content.services .category-products{flex-direction:row}.subnav-content.services .category-products .product-item:not(:first-child){margin-left:24px}}.subnav-content .section .heading{color:#055deb;font-size:24px;font-weight:300;padding-top:0;margin-bottom:24px}@media screen and (min-width:877px){.subnav-content .section .heading{display:none}}@media screen and (max-width:876px){.subnav-content .section .heading{color:#8f95a3;font-size:20px}}.subnav-content .section .heading+.category{margin-top:-16px}.subnav-content ul{list-style:none}.subnav-content .categories{display:flex;flex-direction:row;-moz-column-gap:32px;column-gap:32px}@media screen and (max-width:876px){.subnav-content .categories{flex-direction:column}}.subnav-content .category{padding:0 40px 40px 0}@media screen and (max-width:876px){.subnav-content .category{padding-bottom:24px;padding-right:0}}.subnav-content .category .subheading{color:#8f95a3;font-size:14px;margin-bottom:10px}@media screen and (min-width:877px){.subnav-content .category .subheading{font-size:16px}}.subnav-content .category-products{display:flex;flex-direction:column}.product-item:not(:last-child){margin-bottom:6px}@media screen and (min-width:877px){.product-item{margin-left:-16px}}@media screen and (max-width:876px){.product-item{margin-right:0}}.product-item .product-link{display:flex;flex-direction:row;align-items:center;padding:16px;border-radius:8px;min-width:100px;text-decoration:none}@media screen and (min-width:877px){.product-item .product-link{max-width:400px}}@media screen and (max-width:876px){.product-item .product-link{padding:14px 16px;margin-left:-16px;margin-right:-16px}}.product-item .product-link.with-description{align-items:flex-start}.product-item .product-link.active{background-color:rgba(200,221,255,.2)}.product-item .product-link.active span{color:#055deb;font-weight:700}@media screen and (min-width:877px){.product-item .product-link.active{background-color:var(--product-color)}.product-item .product-link.active span{color:#fff}.product-item .product-link.active .description{color:#fff}.product-item .product-link.active svg:not(.outline-logo) path{fill:#fff}}.product-item .product-link .external-link{display:flex}.product-item .product-link svg{flex-shrink:0;margin-right:12px;width:44px;height:44px}@media screen and (max-width:876px){.product-item .product-link svg{margin:0 16px 0 0;width:32px;height:32px}}.product-item .product-link span{font-size:15px;color:#212121}@media screen and (max-width:876px){.product-item .product-link span{font-size:16px}}.product-item .product-link .description{font-size:14px;color:#6a707f;margin-top:4px}#navbar{--logo-underline:white;--product-teamdev-logo:white;--menu-icon:white;--menu-icon-border:rgba(255, 255, 255, .54)}.logo .logo-nav-link .icon-menu{font-size:24px;color:var(--menu-icon)}.logo .logo-nav-link .icon-menu:before{display:flex;align-items:center;justify-content:center;height:40px;width:40px}.logo{height:100%;margin-right:auto}.logo .logo-nav-link{display:flex;align-items:center;text-decoration:none;height:100%;padding:0 20px;margin-left:-20px;will-change:width}@media screen and (max-width:876px){.logo .logo-nav-link{display:flex;align-items:center;height:100%}}.logo .logo-nav-link .teamdev-logo{height:30px}@media screen and (max-width:876px){.logo .logo-nav-link .teamdev-logo{height:24px}}@media screen and (min-width:877px){.logo .logo-nav-link .icon-menu{display:none}}.logo .logo-nav-link.product-logo{position:relative}.logo .logo-nav-link.product-logo .teamdev-logo{position:absolute;top:0;width:100px;transform-origin:left;transform:scale(.45)translateY(0)translateZ(0);will-change:transform}.logo .logo-nav-link.product-logo .teamdev-logo svg path{fill:var(--product-teamdev-logo)}.logo .logo-nav-link.product-logo .icon-menu{border:1px solid var(--menu-icon-border);margin:-1px}.logo .logo-nav-link.product-logo .product-sign{flex-shrink:0;display:inline-block;width:40px;height:40px;vertical-align:middle}.logo .logo-nav-link.product-logo .product-sign svg path{fill:#fff}.logo .logo-nav-link.product-logo .product-name{text-decoration:none;font-size:30px;font-weight:300;color:var(--navbar-logo-text-color);line-height:1;margin:3px 0 0 8px;vertical-align:middle;border-bottom:1px dotted transparent}@media screen and (max-width:1080px){.logo .logo-nav-link.product-logo .product-name{font-size:26px;margin-top:1px}}@media screen and (max-width:960px){.logo .logo-nav-link.product-logo .product-name{font-size:20px}}@media screen and (max-width:876px){.logo .logo-nav-link.product-logo .icon-menu,.logo .logo-nav-link.product-logo .teamdev-logo{display:none}}@media screen and (max-width:480px){.logo .logo-nav-link.product-logo{width:126px}.logo .logo-nav-link.product-logo .icon-menu{display:block;border-color:transparent}.logo .logo-nav-link.product-logo .product-sign{margin-left:6px}.logo .logo-nav-link.product-logo .product-name{display:none}}#navbar{--lang-select-arrow-color:rgba(255, 255, 255, .64);--lang-select-bg-color:rgba(255, 255, 255, .12)}.language-select-holder{position:relative;margin:0 -10px 0 20px}@media screen and (max-width:1024px){.language-select-holder{margin-left:8px}}@media screen and (max-width:768px){.language-select-holder{margin-left:auto}}@media screen and (min-width:877px){.mobile-arrow-nav-item{display:none}}.mobile-arrow-nav-item .nav-link{display:flex;align-items:center;flex-direction:row;justify-content:space-between;padding:22px 0;color:#212121;border-top:1px dotted rgba(0,0,0,.16)}.mobile-arrow-nav-item .icon{font-size:24px;color:rgba(0,0,0,.26);margin-right:6px}:root{--snackbar-bottom-position:20px}.common-tab-content{display:none;opacity:0}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:1003;animation:animateTop .2s}.modal .modal-content{display:flex;flex-direction:column;background-color:#fff;border-radius:10px;box-shadow:0 2px 16px rgba(0,0,0,.38);max-width:600px;max-height:calc(100vh - 2 * 40px);margin:40px auto;color:#212121}@media screen and (max-width:640px){.modal .modal-content{margin:40px 16px}}.modal .modal-header{flex-shrink:0;display:flex;justify-content:space-between;padding:16px 32px}.modal .modal-header .modal-title{color:#212121;font-size:24px;font-weight:300;line-height:1.2;padding-top:8px;margin-bottom:0}.modal .modal-body{display:flex;flex-direction:column;flex-grow:1;overflow:auto;padding:0 32px 16px}.modal .modal-footer{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;padding:16px 32px}@keyframes animateTop{0%{top:-300px;opacity:0}100%{top:0;opacity:1}}.code-editor{position:relative;display:block;font-family:fira code,monospace;font-size:13px;background-color:#fff;font-weight:400;border-radius:4px;padding:0 0 0 30px;margin-bottom:20px;box-shadow:0 1px 3px rgba(200,221,255,.6),0 4px 25px #c8ddff}@media screen and (max-width:640px){.code-editor{padding-left:15px}}@media screen and (max-width:576px){.code-editor{white-space:normal;word-wrap:break-word}}.code-editor .hide{display:none!important}.code-editor .scroll{overflow:auto;max-height:680px;padding-left:5px;margin-left:-5px}@media screen and (max-width:640px){.code-editor .scroll{padding-left:10px;margin-left:-10px}}.code-editor:before{position:absolute;content:'';top:0;left:0;background:#f0f0f0;border-right:1px solid #d0d0d0;width:30px;height:100%;border-radius:4px 0 0 4px;z-index:2}@media screen and (max-width:640px){.code-editor:before{width:15px}}.code-editor .comments{color:gray;font-weight:500;font-style:italic;white-space:nowrap}.code-editor .keyword{color:navy;font-weight:500}.code-editor .link,.code-editor .string{color:#397f00;font-weight:500;background-color:transparent}.code-editor.visual-studio .comments{color:green;font-weight:400;font-style:normal}.code-editor.visual-studio .keyword{color:#00f}.code-editor.visual-studio .link{color:#00f;font-weight:400}.code-editor.visual-studio .name{color:#2b91af}.code-editor.xml-code .comments{color:green;font-weight:400;font-style:normal}.code-editor.xml-code .tag{color:#3b00fa}.code-editor.xml-code .tagname{color:#860907}.code-editor.xml-code .attribute{color:#ff1e1a}.code-editor.xml-code .string{color:#3b00f9}.ul-tree{position:relative;padding-left:0;margin:0}@media screen and (max-width:576px){.ul-tree{background-color:#fff}}.ul-tree ul{position:relative;margin:0;padding-left:0}.ul-tree ul:last-child{margin-bottom:0}.ul-tree .fourth-level,.ul-tree .second-level,.ul-tree .third-level{padding-left:12px}.ul-tree .bordered-level{border-left:1px solid #e6e6e6}.ul-tree .active>.shortening{display:none}.ul-tree .active>.filling{background-color:transparent}.ul-tree .active>.left-brace,.ul-tree .active>.right-brace{margin:0}.ul-tree .filling{background-color:#ecfaeb}.ul-tree .no-shift{padding:0}.ul-tree .no-shift li{padding:0}.ul-tree .right-brace{margin-left:-8px;padding-right:1px}.ul-tree li{position:relative;list-style:none outside none;margin:0;padding-left:14px;line-height:20px;white-space:nowrap}@media screen and (max-width:640px){.ul-tree li{line-height:18px}}.ul-tree>li{padding-left:8px}@media screen and (max-width:640px){.ul-tree>li{line-height:18px}}.ul-tree .empty-line{line-height:19px}@media screen and (max-width:640px){.ul-tree .empty-line{line-height:18px}}.ul-tree.ul-tree-drop .drop{position:absolute;width:11px;height:11px;top:6px;left:-5px;background:url(/images/icons/code-collapse-controls.png)no-repeat;z-index:2}.ul-tree.ul-tree-drop .second-level .drop{top:5px;left:-25px}.ul-tree.ul-tree-drop .second-level .drop-bottom{left:-25px;bottom:6px}.ul-tree.ul-tree-drop .third-level .drop{left:-52px}.ul-tree.ul-tree-drop .third-level .drop-bottom{left:-52px}.ul-tree.ul-tree-drop .drop-bottom{position:absolute;display:inline-block;width:11px;height:11px;bottom:5px;left:-5px;background:url(/images/icons/code-collapse-controls.png)-22px 0 no-repeat;z-index:2}.ul-tree.ul-tree-drop .active>.drop{background-position:-11px 0}#redirect-suggestion .modal-content{max-width:500px}#redirect-suggestion .modal-footer{gap:16px;justify-content:flex-end}@media screen and (max-width:480px){#redirect-suggestion .modal-footer{flex-direction:column;margin-bottom:16px}}#redirect-suggestion .modal-footer .btn{padding:8px 20px}#redirect-suggestion .modal-footer .btn-no{min-width:96px}.additional-field{height:0;font-size:0;line-height:0;padding:0;margin:0;border:none;overflow:hidden}.thank-you-section{display:none}.thank-you-section .thank-you-holder{max-width:460px;margin:0 auto;text-align:center}.thank-you-section .icon{font-size:64px;color:#055deb}.thank-you-section .title{font-size:30px;font-weight:700;padding-top:8px;margin-bottom:8px}.code-tabs{--code-tabs-indicator-line-color:var(--product-color);margin:20px 0 32px}.code-tabs .tabs{position:relative;display:flex}.code-tabs .tabs .tab{display:inline-block;padding:14px 16px;font-family:pragmatica,Helvetica,Arial,sans-serif;color:#8f95a3;font-weight:700;font-size:12px;line-height:1}.code-tabs .code-tab-content p{padding-top:0!important;margin-bottom:8px}.code-tab-content{display:none}.code-tab-content p:first-child{padding-top:0!important}:root{--hero-overlay-color:black}.dotnetbrowser .hero.product{background-image:url(/images/product-visuals/dotnetbrowser.webp)}@media screen and (max-width:768px){.dotnetbrowser .hero.product{background-image:url(/images/product-visuals/dotnetbrowser-mobile.webp)}}.hero.product{position:relative;background-position:50% 60%;background-repeat:no-repeat;background-size:cover}.hero.product:before{content:'';position:absolute;background:linear-gradient(to right,var(--hero-overlay-color) 20%,transparent 100%)no-repeat;background-size:cover;opacity:.8;width:100%;height:100%;top:0;left:0;right:0;bottom:0}@media screen and (max-width:768px){.hero.product:before{background:#000;opacity:.65}}.hero.product .page-content{color:#fff;padding-bottom:48px}.hero.product .page-content .title{font-size:30px;color:#fff;font-weight:700;margin-bottom:24px;line-height:1.3}@media screen and (max-width:960px){.hero.product .page-content .title br{content:""}.hero.product .page-content .title br:after{content:" "}}@media screen and (max-width:480px){.hero.product .page-content .title{font-size:24px}}.hero.product .page-content .mobile-product-name{font-size:40px;font-weight:300;color:#fff}@media screen and (min-width:481px){.hero.product .page-content .mobile-product-name{display:none}}.hero.product .page-content .requirements{text-shadow:0 1px 2px rgba(0,0,0,.6);margin-bottom:40px}.hero.product .page-content .requirements.no-bottom-margin{margin-bottom:0}@media screen and (max-width:480px){.hero.product .page-content .hero-btn{width:100%}}.hero.product .page-content .release-info{display:flex;flex-wrap:wrap;margin-top:40px;list-style:none;text-shadow:0 1px 2px rgba(0,0,0,.6);letter-spacing:.2px}@media screen and (max-width:640px){.hero.product .page-content .release-info{flex-direction:column}}.hero.product .page-content .release-info li{margin-right:24px;margin-top:8px}.hero.product .page-content .release-info .icon{display:inline-block;font-size:20px;vertical-align:middle;margin-top:-3px}.hero.product .page-content a:not(.btn){color:#fff;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.5)}.why-product .row{display:grid;grid-template-columns:repeat(3,1fr);gap:32px 80px}@media screen and (max-width:768px){.why-product .row{grid-template-columns:1fr}}.why-product .row .why-item{position:relative}.why-product .row .why-item .icon{font-size:32px;color:#055deb}@media screen and (max-width:768px){.why-product .row .why-item .icon{position:absolute}}.why-product .row .why-item .info-block{padding-top:10px}@media screen and (max-width:768px){.why-product .row .why-item .info-block{padding-top:6px;padding-left:56px}}.why-product .row .why-item .title{font-size:18px;padding-top:0;margin-bottom:8px}@media screen and (min-width:1025px){.jxbrowser .features.bento-layout .feature-list .feature-card:first-child{grid-area:a}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(2){grid-area:b}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(3){grid-area:c}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(4){grid-area:d}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(5){grid-area:e}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(6){grid-area:f}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(7){grid-area:g}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(8){grid-area:h}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(9){grid-area:i}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(10){grid-area:j}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(11){grid-area:k}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(12){grid-area:l}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(13){grid-area:m}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(14){grid-area:n}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(15){grid-area:o}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(16){grid-area:p}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(17){grid-area:q}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(18){grid-area:r}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(19){grid-area:s}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(20){grid-area:t}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(21){grid-area:u}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(22){grid-area:v}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(23){grid-area:w}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(24){grid-area:x}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(25){grid-area:y}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(26){grid-area:z}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(27){grid-area:aa}.jxbrowser .features.bento-layout .feature-list .feature-card:nth-child(28){grid-area:bb}}@media screen and (min-width:1025px){.dotnetbrowser .features.bento-layout .feature-list .feature-card:first-child{grid-area:a}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(2){grid-area:b}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(3){grid-area:c}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(4){grid-area:d}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(5){grid-area:e}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(6){grid-area:f}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(7){grid-area:g}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(8){grid-area:h}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(9){grid-area:i}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(10){grid-area:j}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(11){grid-area:k}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(12){grid-area:l}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(13){grid-area:m}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(14){grid-area:n}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(15){grid-area:o}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(16){grid-area:p}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(17){grid-area:q}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(18){grid-area:r}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(19){grid-area:s}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(20){grid-area:t}.dotnetbrowser .features.bento-layout .feature-list .feature-card:nth-child(21){grid-area:u}}.features .feature-list .feature-backdrop{position:fixed;background-color:#000;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transform:translate3d(0,0,0);top:0;right:0;bottom:0;left:0;opacity:0;z-index:1002}.getting-help .support-plans .body .btn{display:inline-flex;justify-content:center;width:100%}@media screen and (max-width:768px){.getting-help .support-plans .body .btn{font-size:14px;padding:12px 10px}}.pricing .price-options .option-actions .btn{width:100%}.support-pricing .action .btn{width:100%}.simple-integration .common-tab-content .content-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:32px}@media screen and (max-width:860px){.simple-integration .common-tab-content .content-row{display:block;max-width:620px;margin:0 auto}.simple-integration .common-tab-content .content-row .col{margin-bottom:32px}}.simple-integration .common-tab-content .guide-button{display:flex;flex-direction:column;align-items:center;margin:40px 0 24px}.simple-integration .code-container .title{font-size:24px;font-weight:300;padding:0;margin-bottom:16px}.simple-integration .code-container .subtitle{font-size:14px;color:#6a707f;margin:-16px 0 16px}.simple-integration .code-column>.code-container{margin-bottom:40px}.simple-integration .code-tabs .tabs{margin-bottom:20px}.simple-integration .code-tabs .tabs .tab{border:1px solid rgba(var(--product-color-rgb),.7);color:var(--product-color);padding:6px 16px;font-weight:400}.simple-integration .code-tabs .tabs .tab:first-child{border-radius:3px 0 0 3px}.simple-integration .code-tabs .tabs .tab:not(:first-child){border-left:none}.simple-integration .code-tabs .tabs .tab:last-child{border-radius:0 3px 3px 0}.simple-integration .code-tabs .code-container .subtitle{margin-top:-8px}.simple-integration .demo{position:relative;padding-top:56px}@media screen and (min-width:1201px){.simple-integration .demo{margin:0 32px}}.simple-integration .demo .demo-image{position:relative;border-radius:4px;overflow:hidden;margin:16px auto 0;box-shadow:0 1px 3px rgba(200,221,255,.6),0 4px 25px #c8ddff}.simple-integration .demo .demo-image:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1}.simple-integration .demo .demo-image .app-window{position:relative;display:block;width:100%;height:auto}.dotnetbrowser .simple-integration .demo{padding-top:52px}@media screen and (max-width:860px){.dotnetbrowser .simple-integration .demo{padding-top:0}}.modal.contact-modal .modal-body{padding-bottom:32px}.modal form .form-actions{margin-top:0}.modal .thank-you-section .section-content{padding-top:20px}
Products
Browser integration
Java native integration
Domain-Driven Design
Back to blog Blazor hybrid apps in Avalonia UI September 17, 2024 Vladyslav Lubenskyi
Anna Dolbina
Blazor is a .NET front end framework for building web apps using only .NET
technologies. In 2021, Blazor extended to the desktop with Blazor Hybrid,
allowing developers to use their existing skills on desktop platforms.
Blazor Hybrid apps are traditional desktop apps that host the actual Blazor web
app inside a web view control. They use .NET MAUI for the desktop side, but you
can use another framework if it doesn’t meet your requirements.
The lack of Linux support and the use of different browser engines on Windows
and macOS are limitations of MAUI. Microsoft Edge and Safari vary in how they
implement web standards, execute JavaScript, and render pages. In advanced apps,
this difference can be a source of bugs and require additional testing.
If MAUI is not an option, consider opting for Avalonia UI — a cross-platform UI
library with several Chromium-based web views in its ecosystem.
In this article, we explore how to use Avalonia UI to create Blazor Hybrid apps
with DotNetBrowser as a web view.
Quick start with a template To create a basic Blazor Hybrid app with DotNetBrowser and Avalonia UI use our
template:
dotnet new install DotNetBrowser.Templates
Then, get a free 30-day evaluation license for DotNetBrowser.
Sending…
Sorry, the sending was interrupted
Please try again. If the issue persists, contact us at
info@teamdev.com .
Your personal DotNetBrowser trial key and quick start guide will arrive in your Email Inbox in a few minutes.
Create a Blazor Hybrid app from the template and pass your license key as a
parameter:
dotnet new dotnetbrowser.blazor.avalonia.app -o Blazor.AvaloniaUi -li <your_license_key>
And run the app:
dotnet run --project Blazor.AvaloniaUi
Blazor Hybrid app on Avalonia UI on Linux.
Implementation In the hybrid environment, the Blazor app runs in the process of its desktop
shell. That shell, or a window, manages the lifecycle of the whole app, shows
the web view, and starts the Blazor app. We’re going to create that window with
Avalonia UI.
The Blazor app’s back end is .NET code, and the front end is web content hosted
inside a web view. The browser engine inside a web view and the .NET runtime
don’t have a direct connection. So, for the back and front end to communicate,
Blazor must know how to exchange data between them. We’re introducing a new web
view, so we must teach Blazor how to do it with DotNetBrowser.
Next, we’ll walk you through the key pieces that integrate Blazor with Avalonia
and DotNetBrowser. Check out the template above for the complete solution.
Creating a window To host a Blazor Hybrid app, we need to create a regular Avalonia window with a
web view component.
MainWindow.axaml
<Window ... Closed= "Window_Closed" >
<browser:BlazorBrowserView x:Name= "BrowserView" ... />
...
</browser:BlazorBrowserView>
</Window>
MainWindow.axaml.cs
public partial class MainWindow : Window
{
public MainWindow ()
{
InitializeComponent ();
...
BrowserView . Initialize ();
}
private void Window_Closed ( object sender , EventArgs e )
{
BrowserView . Shutdown ();
}
}
The BlazorBrowserView
is an Avalonia control that we create to encapsulate
DotNetBrowser. Later we will integrate it with Blazor in this control.
BlazorBrowserView.axaml
<UserControl ... >
...
<avaloniaUi:BrowserView x:Name= "BrowserView" IsVisible= "False" ... />
</UserControl>
BlazorBrowserView.axaml.cs
public partial class BlazorBrowserView : UserControl
{
private IEngine engine ;
private IBrowser browser ;
public BlazorBrowserView ()
{
InitializeComponent ();
}
public async Task Initialize ()
{
EngineOptions engineOptions = new EngineOptions . Builder
{
RenderingMode = RenderingMode . HardwareAccelerated
}. Build ();
engine = await EngineFactory . CreateAsync ( engineOptions );
browser = engine . CreateBrowser ();
...
Dispatcher . UIThread . InvokeAsync ( ShowView );
}
public void Shutdown ()
{
engine ?. Dispose ();
}
private void ShowView ()
{
BrowserView . InitializeFrom ( browser );
BrowserView . IsVisible = true ;
browser ?. Focus ();
}
}
Configuring Blazor In hybrid apps, the main entity responsible for integration between Blazor and
the environment is WebViewManager
. This is an abstract class, so we create our
own implementation called BrowserManager
and instantiate it in
BlazorBrowserView
.
BrowserManager.cs
class BrowserManager : WebViewManager
{
private static readonly string AppHostAddress = "0.0.0.0" ;
private static readonly string AppOrigin = $"https://{AppHostAddress}/" ;
private static readonly Uri AppOriginUri = new ( AppOrigin );
private IBrowser Browser { get ; }
public BrowserManager ( IBrowser browser , IServiceProvider provider ,
Dispatcher dispatcher ,
IFileProvider fileProvider ,
JSComponentConfigurationStore jsComponents ,
string hostPageRelativePath )
: base ( provider , dispatcher , AppOriginUri , fileProvider , jsComponents ,
hostPageRelativePath )
{
Browser = browser ;
}
...
}
BlazorBrowserView.axaml.cs
public partial class BlazorBrowserView : UserControl
{
private IEngine engine ;
private IBrowser browser ;
private BrowserManager browserManager ;
...
public async Task Initialize ()
{
EngineOptions engineOptions = new EngineOptions . Builder
{
RenderingMode = RenderingMode . HardwareAccelerated
}. Build ();
engine = await EngineFactory . CreateAsync ( engineOptions );
browser = engine . CreateBrowser ();
...
browserManager = new BrowserManager ( browser , ...);
...
}
...
}
A Blazor app requires one or more root components. We add them to WebViewManager
when the web view is being initialized.
RootComponent.cs
public class RootComponent
{
public string ComponentType { get ; set ; }
public IDictionary < string , object > Parameters { get ; set ; }
public string Selector { get ; set ; }
public Task AddToWebViewManagerAsync ( BrowserManager browserManager )
{
ParameterView parameterView = Parameters == null
? ParameterView . Empty
: ParameterView . FromDictionary ( Parameters );
return browserManager ?. AddRootComponentAsync (
Type . GetType ( ComponentType )!, Selector , parameterView );
}
}
BlazorBrowserView.axaml.cs
public partial class BlazorBrowserView : UserControl
{
private IEngine engine ;
private IBrowser browser ;
private BrowserManager browserManager ;
public ObservableCollection < RootComponent > RootComponents { get ; set ; } = new ();
...
public async Task Initialize ()
{
...
engine = await EngineFactory . CreateAsync ( engineOptions );
browser = engine . CreateBrowser ();
browserManager = new BrowserManager ( browser , ...);
foreach ( RootComponent rootComponent in RootComponents )
{
await rootComponent . AddToWebViewManagerAsync ( browserManager );
}
...
}
...
}
MainWindow.axaml
<Window ... Closed= "Window_Closed" >
<browser:BlazorBrowserView x:Name= "BrowserView" ... />
<browser:BlazorBrowserView.RootComponents>
<browser:RootComponent Selector= "..." ComponentType= "..." />
</browser:BlazorBrowserView.RootComponents>
</browser:BlazorBrowserView>
</Window>
Loading static resources In a regular web app, the browser loads pages and static resources by making
HTTP requests to a server. In a Blazor Hybrid app, it works the same way, but
there is no server. Instead, WebViewManager
provides a method called
TryGetResponseContent
that takes a URL and returns data as a quasi HTTP
response.
We deliver HTTP requests and responses to this method and back by intercepting
HTTPS traffic in DotNetBrowser.
BlazorBrowserView.axaml.cs
public partial class BlazorBrowserView : UserControl
{
private IEngine engine ;
private IBrowser browser ;
private BrowserManager browserManager ;
...
public async Task Initialize ()
{
EngineOptions engineOptions = new EngineOptions . Builder
{
RenderingMode = RenderingMode . HardwareAccelerated ,
Schemes =
{
{
Scheme . Https ,
new Handler < InterceptRequestParameters ,
InterceptRequestResponse >( OnHandleRequest )
}
}
}. Build ();
engine = await EngineFactory . CreateAsync ( engineOptions );
browser = engine . CreateBrowser ();
browserManager = new BrowserManager ( browser , ...);
...
}
public InterceptRequestResponse OnHandleRequest (
InterceptRequestParameters params ) =>
browserManager ?. OnHandleRequest ( params );
...
}
BrowserManager.cs
internal class BrowserManager : WebViewManager
{
private static readonly string AppHostAddress = "0.0.0.0" ;
private static readonly string AppOrigin = $"https://{AppHostAddress}/" ;
private static readonly Uri AppOriginUri = new ( AppOrigin );
...
public InterceptRequestResponse OnHandleRequest ( InterceptRequestParameters p )
{
if (! p . UrlRequest . Url . StartsWith ( AppOrigin ))
{
// If request doesn't start with AppOrigin, let it through.
return InterceptRequestResponse . Proceed ();
}
ResourceType resourceType = p . UrlRequest . ResourceType ;
bool allowFallbackOnHostPage = resourceType is ResourceType . MainFrame
or ResourceType . Favicon
or ResourceType . SubResource ;
if ( TryGetResponseContent ( p . UrlRequest . Url , allowFallbackOnHostPage ,
out int statusCode , out string _ ,
out Stream content ,
out IDictionary < string , string > headers ))
{
UrlRequestJob urlRequestJob = p . Network . CreateUrlRequestJob ( p . UrlRequest ,
new UrlRequestJobOptions
{
HttpStatusCode = ( HttpStatusCode ) statusCode ,
Headers = headers
. Select ( pair => new HttpHeader ( pair . Key , pair . Value ))
. ToList ()
});
Task . Run (() =>
{
using ( MemoryStream memoryStream = new ())
{
content . CopyTo ( memoryStream );
urlRequestJob . Write ( memoryStream . ToArray ());
}
urlRequestJob . Complete ();
});
return InterceptRequestResponse . Intercept ( urlRequestJob );
}
return InterceptRequestResponse . Proceed ();
}
}
Navigation Now, when the web view can navigate to the app pages and load static resources,
we can load the index page and teach WebViewManager
to perform the navigation.
BlazorBrowserView.axaml.cs
public partial class BlazorBrowserView : UserControl
{
private IEngine engine ;
private IBrowser browser ;
private BrowserManager browserManager ;
...
public async Task Initialize ()
{
...
engine = await EngineFactory . CreateAsync ( engineOptions );
browser = engine . CreateBrowser ();
browserManager = new BrowserManager ( browser , ...);
foreach ( RootComponent rootComponent in RootComponents )
{
await rootComponent . AddToWebViewManagerAsync ( browserManager );
}
browserManager . Navigate ( "/" );
...
}
...
}
BrowserManager.cs
internal class BrowserManager : WebViewManager
{
...
private IBrowser Browser { get ; }
...
protected override void NavigateCore ( Uri absoluteUri )
{
Browser . Navigation . LoadUrl ( absoluteUri . AbsoluteUri );
}
}
Exchanging data Unlike regular web apps, Blazor Hybrid doesn’t use HTTP for exchanging data. The
front end and the back end communicate with string messages using a special
.NET-JavaScript interop. In JavaScript, the messages are sent and received via
the window.external
object, and on the .NET side, via WebViewManager
.
We use DotNetBrowser .NET-JavaScript bridge to create the window.external
object and transfer the messages.
BrowserManager.cs
internal class BrowserManager : WebViewManager
{
...
private IBrowser Browser { get ; }
private IJsFunction sendMessageToFrontEnd ;
public BrowserManager ( IBrowser browser , IServiceProvider provider ,
Dispatcher dispatcher ,
IFileProvider fileProvider ,
JSComponentConfigurationStore jsComponents ,
string hostPageRelativePath )
: base ( provider , dispatcher , AppOriginUri , fileProvider , jsComponents ,
hostPageRelativePath )
{
Browser = browser ;
// This handler is called after the page is loaded
// but before it executes its own JavaScript.
Browser . InjectJsHandler = new Handler < InjectJsParameters >( OnInjectJs );
}
...
private void OnInjectJs ( InjectJsParameters p )
{
if (! p . Frame . IsMain )
{
return ;
}
dynamic window = p . Frame . ExecuteJavaScript ( "window" ). Result ;
window . external = p . Frame . ParseJsonString ( "{}" );
// When the page will call these methods, DotNetBrowser will
// proxy calls to the .NET methods.
window . external . sendMessage = ( Action < dynamic >) OnMessageReceived ;
window . external . receiveMessage = ( Action < dynamic >) SetupCallback ;
}
private void OnMessageReceived ( dynamic obj )
{
this . MessageReceived ( new Uri ( Browser . Url ), obj . ToString ());
}
private void SetupCallback ( dynamic callbackFunction )
{
sendMessageToFrontEnd = callbackFunction as IJsFunction ;
}
protected override void SendMessage ( string message )
{
sendMessageToFrontEnd ?. Invoke ( null , message );
}
}
Conclusion In this article, we discussed Blazor Hybrid, a .NET technology for building
desktop apps with Blazor.
Blazor Hybrid uses .NET MAUI, which comes with two limitations:
Does not support Linux. Uses different browser engines on Windows and macOS, where the same app can
behave and look differently. We suggested using Avalonia UI + DotNetBrowser instead. This combination
provides the full support of Windows, macOS, and Linux, and ensures a consistent
browser environment across all platforms.
teamdev.com
uses cookies to help operate the site and gather analytics data. You can read more about it in our Privacy statement . I agree