r/Blazor

▲ 2 r/Blazor

How to manually add routes in blazor?

i have an applications with a bunch of plugins and sub assemblies that create pages.

We are migrating from WPF and creating some new features also.

These pages have characteristics that can be automated so importing the assembly to routing should not be done, because mainly some may even conflict.

So i would like to route them manually and i can add a route to any component, but not integrated in the app:

- add a page, it loads only the page

- add the layout, it does not load the page

- add the app says route not found

WebServer.MapGet("/lm", () => new RazorComponentResult<Page>());

WebServer.MapGet("/lm2", () => new RazorComponentResult<Layout>());

WebServer.MapGet("/lm3", () =>

{

RazorComponentResult rr = new RazorComponentResult<WebApp>();

return rr;

}

);

reddit.com
u/FairZookeepergame874 — 19 hours ago
▲ 5 r/Blazor

Is there a way to write a Blazor app without wasm that doesn’t require server round trip for things like drop-down menus?

Situation is we want to embed an app somewhere that doesn’t support wasm, but we also don’t want to have to involve the server for simple things like drop-down menus

Is this just not possible with blazor?

reddit.com
u/catmanjan2 — 5 days ago
▲ 26 r/Blazor+1 crossposts

Blazorise 2.3 released

Hello everyone,

Blazorise 2.3 is out.

For those who don't know it, Blazorise is a UI component library for Blazor that works with Bootstrap, Tailwind, Fluent UI, Material, and other CSS frameworks.

Initially, this release was supposed to be fairly small. If anyone remembers, in one of my previous posts I asked whether it makes more sense to have smaller releases with faster cycles, or bigger releases with slower cycles.

I wanted the faster release cycle.

Yeah... didn't quite go as planned.

I wanted to build a Reporting component. But once I started working on the report designer, I found that we were missing several things in the framework.

Instead of building them only for Reporting, we made them standalone components. That's how we ended up with DockLayout, ContextMenu, PropertyGrid, and a new PDF generation extension.

We also added CodeEditor and Resizer, Gantt milestones and weekly timelines, Scheduler improvements, and completely rebuilt DatePicker and TimePicker with Blazor and C#, removing the Flatpickr dependency.

So yeah, it turned into a much bigger release than originally planned.

Release notes: https://blazorise.com/news/release-notes/230

If you use Blazor, I'd be interested to hear what you think, especially about Reporting and CodeEditor.

PS. The default Reddit post editor is really bad. I hate it. PPS. Post edited with Grammarly because reasons.

u/mladenmacanovic — 5 days ago
▲ 6 r/Blazor

How to Implement Cookie Authentication in Blazor Server-Side Rendering?

I am trying to Implement Cookie Authentication in Blazor Server-Side Rendering past few days, but I'm stuck.

My goal is: when user click the login button, after Authentication success i wand to store the cookie in browser.

The problem with Blazor SSR, the httpContext only available while the page begin pre-rendering. After the user click the login button the httpContext connection was already done, so i can't find the way to set the cookie via httpContext.

Here's what I've tried:

  • After user press the login button, i get the cookie from rest-api response header and i store the cookie in scoped service and i try to store the cookie in browser by get the cookie via that scoped DI service in when user navigate to home-page after authenticate complete and i planned to set the cookie via OnInitilized method using httpContext.Response.Append() method, however, this dosen't work because the scoped service was recreate when new httpContext connection was established, so the cookie not longer available inside the service.

It is Actually Possible to set the cookie when user press the login button in blazor service-side rendering? Or it is only Possible with Blazor WASM?

If there is any recommended patten to implement the cookie authenticate in blazor SSR. I'd really appreciate the explanation.

reddit.com
u/RedEye-Developers — 7 days ago
▲ 17 r/Blazor+1 crossposts

How I Built an Interactive Template Editor for SaaS Using Blazor [Series]

I mentioned a couple weeks ago that we launched our new Template Editor, and it is a Blazor WASM app (within our Blazor Static site).

I also wrote a series of posts about how it works with a ton of code samples, internal considerations and more.

It turned from one reallllllly long post into 8 shorter (but still not short) posts.

TLDR:

Post Description
Building a Visual Template Editor in Blazor WASM A high-level tour of the decisions, architecture, and shared systems behind the editor.
Building Consistent Blazor UX with Source Generators Turning typed C# models into consistent property controls, previews, and rendered blocks with source generators.
Undo, Redo, and Live Preview - No Diffs Needed Compact property addresses, generated tracking facades, transactions, undo/redo, and preview state.
Why Our Blazor App Still Uses TypeScript A practical split between Blazor-owned application state and TypeScript-owned browser behavior.
Beyond Text Replacement: Building Typed Template Variables Keeping Handlebars for content while extending variables to colors, sizes, images, and other typed properties.
Building a System to Generate Complex CSS Generating deterministic CSS for nested blocks, panels, previews, and both browser and server renderers.
Simplifying Complexity: MemoryPack to the Rescue MemoryPack storage, read-time schema repair, and typed MagicOnion communication across browser and server.
Productionizing Our Blazor WebAssembly Editor Runtime performance, trimming, loading experience, and browser-backed testing for a production Blazor WASM editor.

Hope you like it! Would love to know what you think, if there's anything you'd like more info on - or if you think something is dumb (and why ideally).

htmlcsstoimage.com
u/jsneedles — 6 days ago
▲ 38 r/Blazor

BlazorGraphs 3.0 is now available!

Hello everyone, after a lot of work, I'm happy to announce the release of the new version 3.0 of BlazorGraphs. As mentioned in the previous post, I've tried to include in this major release a series of breaking changes I had in mind, as well as others recommended directly by you.

I've mainly merged the namespaces, renamed some components, added new ones, and redone the linecharts (as you can see in the gif). You also have more freedom in choosing colors. Without boring you with a list of all the changes, you can view the changelog directly on the website or in the Git repository.

I know you wanted the site with the live demo and the best-looking tooltips; don't worry, I'll take care of that as soon as possible.

I'm available for any clarification; just ask here in the comments.

I hope you like this new version, hello everyone.

Usefull links:

u/Puzzleheaded-Law-332 — 7 days ago
▲ 0 r/Blazor

Hiring a senior Blazor developer

The US Government Publishing Office is currently recruiting for a senior Blazor developer to help develop a server-hosted, enterprise Blazor application that will manage the GPO's XML publishing operations. This is a full-time, work from home position. (Must be a US resident.) The heart of this application is an XML editor written in C# using the document builder. The application is supported by a middle tier of REST services and a back end developed using MarkLogic and SQL server. Email mrsmith@gpo for more information.

reddit.com
u/No_Whole7126 — 8 days ago
▲ 8 r/Blazor

PhotinoX.Blazor 5.0.0 is out - Blazor desktop apps on native WebViews

PhotinoX.Blazor is an independent fork and continuation of Photino.Blazor for building lightweight cross-platform desktop apps with Blazor and OS-native WebViews:

  • Linux: WebKitGTK 4.1
  • macOS: WKWebView
  • Windows: WebView2

The 5.0 release is a major update across the PhotinoX stack. PhotinoX has moved from the older window-oriented model to an explicit application-oriented model built around PhotinoApplication, PhotinoDispatcher, and PhotinoWindow.

For Blazor apps, this means:

  • explicit application/window separation;
  • PhotinoBlazorApp owns shared services and application lifetime;
  • PhotinoBlazorWindow owns per-window Blazor hosting state;
  • better multi-window support with isolated root components, WebView manager state, dispatcher/synchronization context, and resource handling;
  • unified app custom scheme on Windows, macOS, and Linux;
  • BlazorWebView-style UrlLoading support for top-level navigation;
  • handling for external links, target="_blank", and window.open(...);
  • new native/window lifecycle events from PhotinoX (navigation and content loading);
  • application-level notifications and shutdown/lifecycle handling;
  • Target frameworks: net8.0, net9.0, and net10.0.

NuGet: https://www.nuget.org/packages/PhotinoX.Blazor/5.0.0

GitHub: https://github.com/ivanvoyager/PhotinoX.Blazor

Core PhotinoX repo: https://github.com/ivanvoyager/PhotinoX

Feedback, issues, and real-world use cases are welcome.

reddit.com
u/Cultural-Activity-51 — 7 days ago
▲ 29 r/Blazor

[FOR HIRE] Senior C#/.NET developer looking for next position - Blazor

I'm starting to line up my next position, as my current contract is likely to come to an end in the next month or two.

I've been working with C# for over 20 years and have 30+ years experience as a software engineer/analyst.

Some of you may know me through Blazor University, which I created as a resource for learning Blazor. I hope some of you here have found it useful over the years.

I'm looking primarily for remote C#/.NET/Blazor contract work, although I'm also open to permanent positions and occasional office visits. I'm based in Staffordshire in the UK; Birmingham, Coventry, are okay for regular office visits and I will travel further for rarer visits.

If you know of any opportunities where my experience might be useful, please DM me. I'm happy to provide my CV and further details.

My email address is mrpmorris@gmail.com

Here is my hiring page: https://blazor-university.com/misc/hire-me/

Here is my linked-in page: https://www.linkedin.com/in/peter-morris-007572a7/

And here are some of my projects

reddit.com
u/mrpmorris — 9 days ago
▲ 5 r/Blazor

The best Markdown editor for Blazor Server?

Which Markdown editor/previewer are you guys using for Blazor server? We need to implement markdown-formatted notes along with an editor for them in a blazor server app.

reddit.com
u/ofcistilloveyou — 7 days ago
▲ 10 r/Blazor

Blazor Server architecture for CRUD app that calls REST APIs

Recently built my first Blazor app, and not super happy with the architecture. It is kind of your standard CRUD app. It gets data from 2 different REST APIs.

I tried to do kind of clean architecture as I am more of a backend guy and that is what I am used to. I setup like this. The APIs are external.

  • MyApp (Solution)
    • MyApp.Application (Project)
      • Components
      • Components.Layout
      • Components.Pages
      • Components.Shared
      • Configuration
      • Security
      • Services
    • MyApp.Common
      • Exceptions
      • Constants
    • MyApp.Domain (Project)
      • Exceptions
      • Models
    • MyApp.Infrastructure (Project)
      • Repositories
      • Http

My issue is that MyApp.Application.Services became kind of a dumping ground. I have a few pages that deal with customers so I ended up making a ICustomerService and CustomerService to put some shared logic and business rules in. Then that gets injected into multiple components where I deal with customers.

Reddit only letting me nest 2 levels of bullets so that is why component namespace is listed ahove like that

I feel like I should organize things around features, like have things under a customer namespace, but having trouble coming up with something that feels .NET like.

Any tips or suggestions would be appreciated. Or it would be super if you could point me at a public repo. My app is low-medium complexity, I don't need/want a high level of abstraction.

reddit.com
u/MiniSNES — 10 days ago
▲ 43 r/Blazor

Out now: The Microsoft Fluent UI #Blazor library v5 RC5!

This is the last RC before the final ships in September. New AreaChart, master/detail in DataGrid, Overflow overhaul and much more...

See https://v5.fluentui-blazor.net/. Packages are on NuGet.

Oh btw, if you look closely in the image below, you will see the chart legend now supports rounded corners on the items. This pertains to all chart types we added earlier as well of course (if you set `RoundedCorners="true"`).

Example of the newly added AreaChart

reddit.com
u/vnbaaij — 11 days ago
▲ 16 r/Blazor

I built a Blazor fiddle editor — a JSFiddle/CodePen for Blazor

I honestly get quite a lot of negative backlash whenever I share my projects. I don't really know why, but it is what it is. I still want to keep sharing the things I work on though.

Back when I was working on MudBlazor.Extensions, my Blazor component extension for MudBlazor, I also extended try.mudblazor and eventually took it over as try.mudex.org.

Since then, I've always wanted to build something similar to JSFiddle or CodePen, but specifically for Blazor.

I've finally started working on it and reached the first milestone:

playzor.net

playzor allows you to create Blazor fiddles and share them via embeds, so they can be integrated into other websites.

There are also packages available on NuGet (Playzor packages) that allow you to build and host your own editor.

This is actually what try.mudex.org is using now.

There are still quite a few open points and things that aren't perfect yet. It's definitely still a work in progress, but I wanted to share it anyway and get some feedback.

If you have a look at it, I'd be interested to hear what you think, what is missing, or what could be improved.

Also, I'm really bad at writing documentation. The README and docs were created with AI, so if something doesn't make sense or is missing, that's probably on me.

reddit.com
u/HalOfFame99 — 10 days ago
▲ 23 r/Blazor+1 crossposts

Blazor Developer Tools update: render-batch profiling, tree search & filters

New release of BDT (free & open-source DevTools for Blazor):

- Batches view 📊: the profiler now shows one bar per render batch: click any bar to see exactly which components rendered in that batch and what each cost. It's the fastest way to answer "what did that click actually cost me?"

- Tree search 🔍: finally, type to find a component in big trees.

- Framework filter: one click hides Blazor's plumbing (Router, CascadingValue, LayoutView…) so your components float to the top.

- Version display: the panel now shows both the extension and NuGet package versions, and degrades gracefully when they don't match.

Pairs with NuGet 1.0.0-beta.8, which adds exact render-batch boundaries (older package versions still work, boundaries are inferred instead). Try it live at blazordevelopertools.com . the order-builder demo makes batch costs very visible.

Chrome / Edge / Firefox. Repo: github.com/joe-gregory/blazor-devtools

Feedback and issues welcome!

u/featheredsnake — 11 days ago
▲ 13 r/Blazor

I made a trivi site in blazor and it has users and works formidable.

I made a trivi site as my bachelors thesis (and keep building on it while looking for a job).

Has been super fun to build in blazor, having learned primarily C# at uni.

Database and auth using supabase.

Deployed on kubernetes hosted on my home server.

114.325 page visits so far. Been live for around 25 days.

You can see it here: https://www.trivi.gg/

u/PipeTasty7582 — 11 days ago
▲ 12 r/Blazor+1 crossposts

Writing native macOS Apps with Blazor and AppKit in C#

Sample macOS app with Counter and 2-way binding example, written with BlazorAppKit

Hi Folks, I had been working on this for two weeks for now. Now I have something of a blazor framework which can help with writing native macOS apps with Blazor syntax. It's of alpha quality but I believe it's a worthy Proof-of-Concept that the .NET community can take a look at.

https://github.com/Sathiyaraman-M/BlazorAppKit

This was inspired by one of Steve Sanderson's demos which showed writing a Flutter app with Blazor, which was super-cool but the source code was nowhere to be found. It's a shame that MS didn't adopt Blazor beyond HTML.

For sometime, I wanted to do something that's both Blazor and native. Given I'm on a mac these days, I started with writing an alternate impl for Blazor renderer to write native macOS apps, which relies on the AppKit bindings that come with .NET macOS SDK.

Although I call it a Blazor renderer, the actual rendering of the controls and views are still managed by AppKit entirely. For exposing the AppKit controls, there's a source-generator to generate the Adapter definitions and Component definitions.

I just want to get some thoughts and suggestions on this project.

reddit.com
u/Sathiyaraman_M — 11 days ago
▲ 10 r/Blazor+4 crossposts

Urgent Hiring! . Net Developer /Blazor

Software Engineer – Blazor & .NET Core

Looking for a Software Engineer (4–8 years of experience) with strong expertise in Blazor & .NET Core to work on modern, real-time applications.

Work Mode: Remote

Immediate joiners only

Required Skills:

▪️ Strong experience in C#, .NET Core, and ASP.NET Core
▪️ Hands-on experience with Blazor Server and Blazor WebAssembly
▪️ Experience with SignalR for real-time communication
▪️ Strong knowledge of REST API development and integration
▪️ Experience working with Microsoft Azure services
▪️ Proficiency in Azure DevOps or GitHub Actions for CI/CD
▪️ Good understanding of SQL Server and cloud-native application development
▪️ Experience with Microservices, Docker, Azure Container Apps, or Power BI integration will be an added advantage

 Please share relevant profiles with me at deepthi.seshadri@diligentglobal.com

reddit.com
u/Motor_Ad_5810 — 13 days ago