Closed jimitndiaye closed 2 years ago
Hello,
The use of MarkupString in the labels was forced because Blazor didnt handle foreign objects well at the time. With .NET 6, I believe it was fixed.
I think you can achieve what you want by creating a new component for labels and registering to be rendered instead of the default one. Then you can use whatever you want inside the foreign object, including buttons.
Please tell me if this helps!
Thanks. I'll try that and let you know.
I'll close this since I believe it's answered. Please feel free to re-open if you think otherwise.
Basically I'd like to achieve something similar to how you are positioning LinkLabels except replacing the Label text with a custom icon button. i notice that that link label is using MarkupString and therefore static HTML and so I'm not sure if embedding a button instead works.