Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor - How to prevent custom component being rendered in base component

$
0
0

I have developed some component in Blazor. All of them are inherited from BaseComponent.

public abstract class BaseComponent : ComponentBase{    [Parameter]    public bool Visible { get; set; } = true;    // Other properties ....}

The Visible property should control if the derived components should be rendered or not.

I want all of derived components have the visibly feature (instead of writing if block in all of the components.

How can I prevent the components being rendered in base component?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>