Skip to content

Instantly share code, notes, and snippets.

@fredgdaley2
Last active November 28, 2019 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredgdaley2/0ba3ee0ef29da2568e2df051b1424ef4 to your computer and use it in GitHub Desktop.
Save fredgdaley2/0ba3ee0ef29da2568e2df051b1424ef4 to your computer and use it in GitHub Desktop.
Blazor Component - Conditional Display
@if (Show)
{
@ChildContent
}
@code {
[Parameter] public bool Show { get; set; }
[Parameter]
public RenderFragment ChildContent { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment