1 Answer, 1 is accepted

You can reuse code by either inheriting from or wrapping Telerik components. There is a basic article that provides some information on this topic: https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-extend-inherit-wrap-reuse-telerik-blazor-components.
I believe that wrapping the components is a better approach. Blazor provides several features that can help with this, including:
- Attribute splatting and arbitrary parameters: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/splat-attributes-and-arbitrary-parameters
- Dynamically-rendered components: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/dynamiccomponent
- Templated components: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/templated-components
Regards,
Anislav Atanasov
Regards,
Anislav Atanasov
Yes, I am open to it but I have to build an extra sample. Can not use my actual code. But my solution should be helpful to other users. I am always thinking of a kind of "Community Toolkit" where to find samples and best-practices. The samples from Telerik are often outdated and hard to get running... Why is nobody updating those samples !?
@Hendrik - Can you please specify which outdated samples are you referring to? If you are talking about the ones in the blazor-ui repo, indeed, some of them are quite old. We have an ongoing effort to:
- Remove the ones that can be replaced with KB articles in the documentation. For example:
- Update the ones that should remain there. For example:
Let me know if you have stumbled upon anything specific that you feel should be updated. All examples in the documentation should be up-to-date, unless they target an old product version by design.